提问人:tamagochi 提问时间:11/18/2023 最后编辑:wjandreatamagochi 更新时间:11/18/2023 访问量:18
我需要在 discord 机器人中单击按钮时显示消息“按钮被按下了多少次”
I need the message "the button is pressed how many times" to be displayed when clicking on the button in the discord bot
问:
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()
答: 暂无答案
评论