嘿,我有一个嵌入,我希望我的机器人反应与自定义表情符号到它,但当我尝试它与我的代码示例,bBot将对发送的每条消息作出反应。下面是我的代码: bot.on("message", (message) => {
if (message.content.startsWith(prefix + "set")) {
const exampleEmbed = new Discord.MessageEmbed()
.setColor('#0099ff')
.setTitle('React to gain ace
我正在尝试创建一个命令,当用户对消息做出反应时,该命令本质上会为用户提供一个角色。我已经尝试了一些代码,但当我运行机器人并对预先发送的消息做出反应时,没有出现错误,也没有任何反应。代码如下:
@client.command()
@commands.guild_only()
async def reactionrole(ctx, emoji, *, role):
roleEmbed = discord.Embed(title='Reaction Roles', description='React to this message with the proper e
所以我有这样的代码: msg = await channel.send("React to this with ✅ to ready up. ``(0/2)``")
await msg.add_reaction('✅')
def check(reaction, user):
return reaction == '✅' and user.id == initiator or user.id == challenger
reaction, user = a
我试图为bot创建一个命令,当消息中提到的每个人都对bot的响应做出反应时,它就会提到原始消息作者
这就是我试过的
if msg.content.startswith('/iniciar'):
async with msg.channel.typing():
mentions = ""
for mention in msg.mentions:
mentions = mentions + " " + men
我的目标是使bot对此嵌入消息做出反应,并在有人作出反应时继续。
@client.event
async def on_message(ctx):
if ctx.author == client.user:
return
if ctx.content.startswith('.summon'):
embed = discord.Embed(title=":crossed_swords:I have been summoned:crossed_swords:", description="to proceed
我一直在开发一个机器人(使用js),它可以对发送的每条消息做出反应,并且我一直在尝试给它发开和关命令。当涉及到机器人的反应时,有没有一种方法可以打开和关闭命令?这就是我所拥有的: 顶部: var emojissetting = 0 开/关(尝试将变量更改为0或1): if (msg === prefix + 'START'){
emojisetting = 1;
message.channel.send("Snoopy is now reading the chat. :book:");
}
if (msg === prefix + 'STOP
我试图找出我在on_reaction_add(message)函数中遗漏了什么,让机器人在用户对另一个玩家的消息做出反应时发送消息。
@client.listen()
async def on_message(message):
"""
Looks for when a member calls 'bhwagon', and after 24 minutes, sends them a message
:param message: the message sent by the user
:return: a DM to