Python Discord机器人只对命令作出一次反应

Python Discord机器人只对命令作出一次反应,python,discord,discord.py,praw,Python,Discord,Discord.py,Praw,我的Discord机器人的一个功能是在G!使用GameDeals命令。问题是,如果在命令使用后bot没有响应,则bot只在命令使用时执行一次。如果我重新启动bot,该命令将再次运行一次 导入不一致 导入日期时间 从discord.ext导入命令 导入异步 进口婴儿车 导入音频读取 令牌=“\uuuuuuu” bot=commands.bot(command_prefix=“G!”) client=discord.client() split_1=“我是” split_2=“我是” split_3

我的Discord机器人的一个功能是在G!使用GameDeals命令。问题是,如果在命令使用后bot没有响应,则bot只在命令使用时执行一次。如果我重新启动bot,该命令将再次运行一次

导入不一致
导入日期时间
从discord.ext导入命令
导入异步
进口婴儿车
导入音频读取
令牌=“\uuuuuuu”
bot=commands.bot(command_prefix=“G!”)
client=discord.client()
split_1=“我是”
split_2=“我是”
split_3=“Im”
split_4=“im”
剩余=无
reddit=praw.reddit(客户端id=“”“”,客户端机密=“”“”,
用户名=“”,密码=“”,用户代理=“”,测试“”)
subreddit=reddit.subreddit(‘游戏交易’)
new_GameDeals=subreddit.new(限制=50)
aanuit=''
@bot.command(name='tutturu')
异步def tutturu(ctx):
path_mp3=“Tutturuu.mp3”
路径\u ffmpeg=r“C:\ffmpeg\bin\ffmpeg.exe”
voice\u state=ctx.author.voice
如果voice_状态不是None:
语音频道=ctx.author.voice.channel
如果语音信道不是无:
vc=等待语音信道。连接()
play(discord.ffmpegpcaudio(可执行文件=path\u ffmpeg,source=path\u mp3))
将audioread.audio_打开(路径为mp3)作为f:
等待异步睡眠(f.持续时间)
等待vc.disconnect()
等待ctx.message.delete()
其他:
等待ctx.channel.send(str(ctx.author.name)+“不在频道中”)
@bot.command(name='GameDeals')
异步def GameDeals(ctx):
有关在新游戏交易中发布的信息:
如果post.title中的“[STEAM]”和post.title中的“free”或post.title中的“free”或post.title中的“100%”,则:
等待ctx.message.channel.send(post.title)
如果post.title中的“[Steam]”和post.title中的(“free”或post.title中的“free”或post.title中的“100%”,则省略):
等待ctx.message.channel.send(post.title)
elif“[Epic Games]”在post.title和(“免费”在post.title或“免费”在post.title或“100%”在post.title中):
等待ctx.message.channel.send(post.title)
如果post.title中的“[Uplay]”和post.title中的('free'或post.title中的'free'或post.title中的'100%”),则:
等待ctx.message.channel.send(post.title)
如果post.title中的“[Humble Bundle]”和post.title中的“'free”或post.title中的“free”或post.title中的“100%”,则:
等待ctx.message.channel.send(post.title)
如果post.title中的“[Epic]”和post.title中的“'free'”或post.title中的“free”或post.title中的“100%”,则:
等待ctx.message.channel.send(post.title)
如果post.title中的“[UPLAY]”和post.title中的('free'或post.title中的'free'或post.title中的'100%”),则:
等待ctx.message.channel.send(post.title)
@命令(name='Help')
异步def帮助(ctx):
等待ctx.message.channel.send('1)G!图图鲁语(图图图鲁语)
等待ctx.message.channel.send('2)G!游戏交易toont je de gratis游戏交易van het瞬间)
等待ctx.message.channel.send('3)G!关闭所有的开关(如图所示)
等待ctx.message.channel.send('3)G!tutturu街岔道(af')
@机器人事件
异步def on_消息(消息):
如果message.content中的“爬行器”或message.content中的“爬行器”而不是message.author.bot:
等待消息。频道。发送('OW MAN')
如果message.content中的'ah fuck'或message.content中的'ah fuck'而不是message.author.bot:
等待message.channel.send(“我不敢相信你这么做了”)
如果message.content而不是message.author.bot中的“谁在洗澡时没有冲马桶”:
等待消息。频道。发送('DISGUUUSTAAAN!!!!!)
等待message.channel.send(file=discord.file('ostang.png'))
如果❤' 在message.content而不是message.author.bot中:
等待消息。频道。发送('❤')
如果message.content=='koekoek'或message.content=='koekoek'而不是message.author.bot:
等待message.channel.send(datetime.datetime.now())
如果message.content中的“我在”,而不是message.author.bot中的“我在”:
rest=message.content.partition(split_1)[2]
等待消息。频道。发送('Hello'+rest+“,我是爸爸”)
如果message.content中的“我在”,而不是message.author.bot中的“我在”:
rest=message.content.partition(split_2)[2]
等待消息。频道。发送('Hello'+rest+“,我是爸爸”)
如果message.content中的“Im”而不是message.author.bot中的“Im”:
rest=message.content.partition(split_3)[2]
等待消息。频道。发送('Hello'+rest+“,我是爸爸”)
如果message.content中的“im”而不是message.author.bot中的“im”:
rest=message.content.partition(split_4)[2]
等待消息。频道。发送('Hello'+rest+“,我是爸爸”)
如果message.content中的“fire”或message.content中的“fire”或message.content中的“lit”或message.content中的“lit”,而不是message.author.bot:
等待消息。频道。发送('