Answer the question
In order to leave comments, you need to log in
Why doesn't client.login work?
import discord, asyncio
from discord.flags import Intents
client = discord.Client()
@client.event
async def on_ready():
print('We have logged in as {0.user}'.format(client))
@client.event
async def on_message(message):
if message.content.startswith('$hello'):
await message.channel. send('Hello!')
async def loopstart():
await client.login('токен бота', bot=True)
await client.connect(reconnect=True)
asyncio.run(loopstart())
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question