【问题标题】:Discord.py bot react to user's next message after using a specific commandDiscord.py 机器人在使用特定命令后对用户的下一条消息做出反应
【发布时间】:2021-07-18 17:01:28
【问题描述】:

例如: 我使用 !react 命令,然后在 1 分钟后发送一条消息,然后机器人使用特定的表情符号对消息作出反应。有可能吗?

  @commands.command()
  @commands.cooldown(1, 600, commands.BucketType.user)
  async def cookieme(self, ctx):

...不知何故记住了这个名字,下次用户说什么时,它会用 cookie 对 msg 做出反应

【问题讨论】:

    标签: discord discord.py


    【解决方案1】:

    我不太明白你的问题,但我会尽力帮助你:

    @bot.command()
    async def react(ctx):
    
      def check(message):
        return ctx.author == message.author and ctx.channel == message.channel
      react = await bot.wait_for("message", check=check)
      await react.add_reaction("?")
    

    【讨论】:

      猜你喜欢
      • 2021-04-11
      • 1970-01-01
      • 1970-01-01
      • 2020-11-07
      • 2021-11-28
      • 2019-11-17
      • 2019-05-24
      • 2021-04-30
      • 1970-01-01
      相关资源
      最近更新 更多