Commit 64c60cff authored by Jens Reidel's avatar Jens Reidel

fetch_message_fast is not that fast

parent 2ddfd9cb
Pipeline #2049 canceled with stages
......@@ -342,7 +342,7 @@ class HungerGames(commands.Cog):
# Check for not included players
try:
msg = await ctx.channel.fetch_message_fast(msg.id)
msg = await ctx.channel.fetch_message(msg.id)
for reaction in msg.reactions:
if reaction.emoji == "\U0001f958":
async for user in reaction.users():
......
......@@ -100,7 +100,7 @@ class Raid(commands.Cog):
return await ctx.send("No Boss active!")
self.boss.update(hp=newhp, initial_hp=newhp)
try:
spawnmsg = await ctx.channel.fetch_message_fast(self.boss["message"])
spawnmsg = await ctx.channel.fetch_message(self.boss["message"])
edited_embed = spawnmsg.embeds[0]
edited_embed.description = re.sub(
r"\d+(,*\d)+ HP", f"{newhp:,.0f} HP", edited_embed.description
......
......@@ -235,7 +235,7 @@ class Werewolf(commands.Cog):
# Check for not included participants
try:
msg = await ctx.channel.fetch_message_fast(msg.id)
msg = await ctx.channel.fetch_message(msg.id)
for reaction in msg.reactions:
if reaction.emoji == "\U0001f43a":
async for user in reaction.users():
......
......@@ -930,7 +930,7 @@ class Game:
await msg.add_reaction(emoji)
# Check for nuisance voters twice, first at half of action timer, and lastly just before counting votes
await self.check_nuisances(msg, eligible_players, emojis, repeat=2)
msg = await self.ctx.channel.fetch_message_fast(msg.id)
msg = await self.ctx.channel.fetch_message(msg.id)
nominated = {u: 0 for u in nominated}
mapping = {emoji: user for emoji, user in zip(emojis, nominated)}
voters = []
......@@ -968,7 +968,7 @@ class Game:
async def check_nuisances(self, msg, eligible_players, emojis, repeat: int) -> None:
for i in range(repeat):
await asyncio.sleep(int(self.timer / repeat))
msg = await self.ctx.channel.fetch_message_fast(msg.id)
msg = await self.ctx.channel.fetch_message(msg.id)
nuisance_voters = set()
is_lacking_permission = None
for reaction in msg.reactions:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment