【发布时间】:2019-02-13 18:07:22
【问题描述】:
这是我的代码:
import discord
import asyncio
channel = None
async def ex(args, message, client, invoke):
global channel
channel = message.channel
one = "????"
two = "????"
three = "????"
one_count = 0
two_count = 0
three_count = 0
vote = discord.Embed(title="**[POLL]**", description=" ", color=0x00ff00)
vote.add_field(name="Please vote for the match type:", value="- "+one+" Solos\n- "+two+" Duos\n- "+three+" Squads", inline=True)
message_1 = await client.send_message(channel, embed=vote)
await client.add_reaction(message_1, one)
await client.add_reaction(message_1, two)
await client.add_reaction(message_1, three)
关于如何让它计算短暂等待后的反应量有什么想法吗?
谢谢
【问题讨论】:
-
那篇文章使用了不和谐的重写,而不是我正在使用的
-
{react.emoji: react.count for react in message.reactions}应该适用于两者。然后只需从该字典中访问您感兴趣的表情符号。 -
我不明白如何在上下文中使用它,你能给我举个例子吗?
标签: python-3.x discord.py