import discord
from discord.ext import commands
Token = 'MYTOKEN'
client = commands.Bot(command_prefix = "!")
hello = [ 'привет', 'hello', 'hi', 'ку', 'доброе утро' ]
helped = [ 'команды', 'help', 'помощь' ]
#!help - (помощь по коммандам бота.)
@client.event
async def on_ready():
print('Succesfull connect!')
@client.command ( pass_context = True)
async def clear (ctx, amount = 100):
await ctx.channel.purge (limit = amount)
@client.event
async def on_message (message):
mdf = message.content.lower()
if mdf in hello:
await message.channel.send ('Привет!')
if mdf in helped:
await message.channel.send ('Пропиши !help')
client.run (Token)
Если я ставлю код, который отвечает за команду clear, То второй кусок кода престает работать и наоборот