Python 不';I don’我的命令好像不协调

Python 不';I don’我的命令好像不协调,python,discord.py,botframework,Python,Discord.py,Botframework,命令被执行,尽管终端说命令不存在。 不知道发生了什么,因为这是我的第一个discord机器人,我知道一点python,所以我很抱歉占用了你们的时间,真的 谢谢你的帮助 import discord from discord.ext import commands bot = commands.Bot(command_prefix= ':') game = discord.Game("with the API") #list of banned words filtered

命令被执行,尽管终端说命令不存在。 不知道发生了什么,因为这是我的第一个discord机器人,我知道一点python,所以我很抱歉占用了你们的时间,真的

谢谢你的帮助

import discord
from discord.ext import commands


bot = commands.Bot(command_prefix= ':')
game = discord.Game("with the API")
#list of banned words
filtered_words = ['bad words']
@bot.event
async def on_ready():
    print("Hello I am online and ready!")

bot.run('token')

#Group message clearing
@bot.command(aliases=['c'])
@commands.has_permissions(manage_messages = True)
async def clear(ctx, amount=1):
        await ctx.channel.purge(Limit = amount)
        await ctx.reply(f'Deleted {clear} messages')

#auto mod
@bot.event
async def on_message(msg):
    for word in filtered_words:
        if word in msg.context:
            await msg.delete()
    await bot.process_commands(msg)

@bot.event
async def on_disconnect():
    print("I seem to be getting disconnected, one minute!")

@bot.event
async def on_member_join(memeber):
    print(f'Weclome {memeber} to the server, please enjoy your stay!')

@bot.event
async def on_message_delete(msg):
    msg.send(" <:raysQ:835686467844964395> ")
导入不一致
从discord.ext导入命令
bot=commands.bot(命令前缀=':')
game=discord.game(“使用API”)
#禁词清单
过滤词=[“坏词”]
@机器人事件
_ready()上的异步定义:
打印(“你好,我在线,准备好了!”)
bot.run('token')
#组消息清除
@命令(别名=['c'])
@commands.has_权限(manage_messages=True)
异步def清除(ctx,数量=1):
等待ctx.channel.purge(限制=数量)
等待ctx.reply(f'Deleted{clear}消息')
#自动修改
@机器人事件
异步def on_消息(消息):
对于已过滤单词中的单词:
如果msg.context中有单词:
等待消息。删除()
等待bot.process_命令(msg)
@机器人事件
_disconnect()上的异步定义:
打印(“我好像断开了连接,一分钟!”)
@机器人事件
成员联接(memeber)上的异步定义:
打印(f'Weclome{memeber}到服务器,请享受您的住宿!)
@机器人事件
消息上的异步定义删除(消息):
msg.send(“”)

bot.run部分应位于文件末尾。它是循环的入口点


另外,请在其他人可以使用之前重新生成您的令牌。

您可以发布您在终端中看到的输出/错误吗?哦,谢谢我编辑了问题并更改了令牌,谢谢您让我知道:D