我需要在 discord 机器人中单击按钮时显示消息“按钮被按下了多少次”

I need the message "the button is pressed how many times" to be displayed when clicking on the button in the discord bot

提问人:tamagochi 提问时间:11/18/2023 最后编辑:wjandreatamagochi 更新时间:11/18/2023 访问量:18

问:

class Baton(disnake.ui.View):
  def __init__(self):
      global start_time
      super().__init__(timeout=None)
      self.value: Optional[bool] = None
  # Когда кнопка подтверждения нажата, установите внутреннее значение на «Истина» 
  # остановить  от большего количества ввода.
  @disnake.ui.button(label="Забрать код ", style=disnake.ButtonStyle.green)
  async def first(self, button: disnake.ui.Button, inter: disnake.MessageInteraction):
    winner = button.
    await inter.response.send_message(f"{winner} нажал первый")
    self.value = True
    self.stop()
Python 不和谐

评论

0赞 wjandrea 11/18/2023
欢迎来到 Stack Overflow!请参观并阅读如何提问
0赞 Community 11/19/2023
请澄清您的具体问题或提供其他详细信息,以准确说明您的需求。正如目前所写的那样,很难确切地说出你在问什么。

答: 暂无答案