我正在尝试用烧瓶制作一个演示的临时api。一旦请求被运行,它应该在我的不和谐服务器的特定通道中发送一条消息。但是,当我尝试运行这个烧瓶时,请给我错误的RuntimeError: Install Flask with the 'async' extra in order to use async views.
我怎么才能把这事做好?
这是我的行动
from flask import Flask, request
import discord
from discord_components import DiscordComponents, ComponentsBot, Butto
我一直在寻找一个适用于我的代码的答案,但我真的找不到答案。我知道如何创建按钮并将它们添加到嵌入的底部,但我无法让它们发送隐藏的消息。这是我的按钮代码:
buttons = [
create_button(style=ButtonStyle.green, label="I liked it"),
create_button(style=ButtonStyle.grey, label="I'm neutral"),
create_button(style=ButtonStyle.red, label="I did not like i
当用户对带有复选标记的消息做出反应时,我该如何使用python中的discord bot向用户发送dm?例如,假设我让我的python机器人发送一条消息,当用户对此做出反应时,它会向该用户发送一个包含信息的dm。 ? 这是我能够构建的代码,我猜它是如何工作的,显然它不是python语法。谢谢! if user.reaction == ✅:
member.send("Nice to know you checked the message thanks")