【发布时间】:2021-11-01 17:35:44
【问题描述】:
@bot.command(aliases=['writing'])
async def shiritori(ctx):
def check(msg):
return msg.author == ctx.author and msg.channel == ctx.channel
while True:
msg = await bot.wait_for('message', check=check)
await ctx.send(str(msg))
此代码等待用户消息输入并将输入消息重新发送到聊天室。但是代码只回复使用“/writing”启动命令的人。如何让代码在任何人启动命令后回复任何具有不和谐角色'@writer'的人?
【问题讨论】:
标签: python discord.py