def wait_for_response(self):
"""
Waits for a message response from the message author, then returns the
new message.
The message we are waiting for will only be accepted if it was sent by
the original command invoker, and it was sent in the same channel as
the command message.
"""
def check(m):
if isinstance(m.channel, discord.DMChannel):
# accept any message, because we are in a dm
return True
return m.channel.id == self.channel.id and m.author == self.author
return await self.bot.wait_for('message', check=check)
评论列表
文章目录