【发布时间】:2022-01-05 02:56:22
【问题描述】:
所以我试图在我的 discord 机器人中实现按钮,但是当点击按钮时,discord 机器人似乎没有响应。我已经完成了所有的导入。
async def testButton(ctx):
ticket = await ctx.send(
"_ _",
components = [
Button(label = "Test", style=ButtonStyle.blue, custom_id="test")
]
)
interaction = await client.wait_for("button_click", check = lambda i: i.custom_id == "test")
await interaction.send(content='Test')
【问题讨论】:
-
你使用什么库?
标签: python discord discord.py