2024-09-30 16:40:31 发布
网友
有人知道如何在专用频道(DM)中使用bot.wait_for_message吗?在
bot.wait_for_message
假设您只想接受来自特定用户的直接私有消息(而不是组私有消息),您可以编写一个检查message.channel.type
message.channel.type
def check(message): return message.channel.type == discord.ChannelType.private await bot.wait_for_message(timeout = 30, author = ctx.message.author, check=check, content="SSM")
如果从专用通道接收到命令,则可以正常等待该通道
假设您只想接受来自特定用户的直接私有消息(而不是组私有消息),您可以编写一个检查
message.channel.type
如果从专用通道接收到命令,则可以正常等待该通道
^{pr2}$相关问题 更多 >
编程相关推荐