【发布时间】:2019-10-27 09:28:31
【问题描述】:
我正在制作一个赠品机器人,但我一直在尝试获取消息的反应列表。我该怎么做?
我已经尝试过ctx.message.reactions 和message.reactions(在这种情况下,消息是一个包含await channel.fetch_message(messageID) 的变量)。
async def stopgiveaway(ctx, messageID):
reaction = []
guild = bot.get_guild(g_id) # g_id is the guild id
channel = guild.get_channel(channel_id) # same as g_id but for channel
message = await channel.fetch_message(messageID)
reaction = reaction.append(ctx.message.reactions)
users = reaction.users(limit=None, after=None)
我不是 python 或 discord.py 方面的专家,我还在学习,如果这是一个愚蠢的问题,请见谅。
【问题讨论】:
-
你想做什么?
message.reactions将是对消息的反应列表,你想用这个列表做什么?
标签: python python-3.x discord discord.py discord.py-rewrite