Answer the question
In order to leave comments, you need to log in
What to do when setting up a python discord bot if an error pops up?
import discord
class MyClient(discord.Client):
async def on_ready(self):
print('Logged on as{0}!'.format(self.user))
async def on_message(self, message):
print('Message from {0.author}: {0.content}'.format(message))
client = MyClient
client.run('ТОКЕН')
Answer the question
In order to leave comments, you need to log in
import discord
from discord.ext import commands
Bot = commands.Bot()
class MyClient(discord.Client):
async def on_ready(self):
print('Logged on as{0}!'.format(self.user))
async def on_message(self, message):
print('Message from {0.author}: {0.content}'.format(message))
Bot.run('ТОКЕН')
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question