@client.event
async def on_raw_reaction_add(payload):
#the embedded msg that was sent
global msg
message_id1 = payload.message_id
#checks if the message that was sent is the message the reaction was added to
if message_id1 == msg.id:
..code..
我还告诉机器人将反应(从1到9之间的所有反
在建立用户、部族和部族成员模型之间的关系时,我面临一些问题。我有三种模式,我把这种关系定义为.
族模型
public function clanMembers() {
return $this->hasMany('App\ClanMember', 'clan_id', 'clan_id');
}
ClanMember模型
public function clan() {
return $this->belongsTo('App\Clan', 'clan_id', 'clan_id
bot=discord.Client()
@bot.event
async def on_message(ctx):
idbot = 835947059721797702
if ctx.author.id == idbot:
channelsnipe = bot.get_channel(825523364844142601)
messageid = ctx.content
await asyncio.sleep(0.2) # Give time for reaction to update on cache
re
我有个问题要问Discord.js。如何从消息中删除特定用户的反应?
我试图用以下代码来实现这个目标:
// Now known as 'messages.fetch'.
message.channel.fetchMessage(MessageID).then(m => {
m.reactions.remove(UserID);
});
但它并没有消除用户的反应。我做错了什么吗?
任何帮助都将不胜感激。