Remove usage of loop arg in calls to start_adding_reactions (#3644)

* fix stacklevels of warnings

* stop using loop arg when calling start_adding_reactions

* [Audio] Stop using loop arg when calling start_adding_reactions
This commit is contained in:
jack1142
2020-03-20 20:44:57 +01:00
committed by GitHub
parent 5074f2dbab
commit eebea59fe3
6 changed files with 18 additions and 8 deletions

View File

@@ -2001,7 +2001,7 @@ class Audio(commands.Cog):
with contextlib.suppress(discord.HTTPException):
await eq_message.add_reaction("\N{INFORMATION SOURCE}")
else:
start_adding_reactions(eq_message, reactions, self.bot.loop)
start_adding_reactions(eq_message, reactions)
eq_msg_with_reacts = await ctx.fetch_message(eq_message.id)
player.store("eq_message", eq_msg_with_reacts)
@@ -2605,7 +2605,7 @@ class Audio(commands.Cog):
if not player.queue:
expected = ("", "")
if player.current:
task = start_adding_reactions(message, expected[:4], ctx.bot.loop)
task = start_adding_reactions(message, expected[:4])
else:
task = None
@@ -6334,7 +6334,7 @@ class Audio(commands.Cog):
expected = ("", "")
emoji = {"stop": "", "pause": ""}
if player.current:
task = start_adding_reactions(message, expected[:4], ctx.bot.loop)
task = start_adding_reactions(message, expected[:4])
else:
task = None

View File

@@ -1286,7 +1286,7 @@ class Downloader(commands.Cog):
query: discord.Message = await ctx.send(message)
if can_react:
# noinspection PyAsyncCall
start_adding_reactions(query, ReactionPredicate.YES_OR_NO_EMOJIS, ctx.bot.loop)
start_adding_reactions(query, ReactionPredicate.YES_OR_NO_EMOJIS)
pred = ReactionPredicate.yes_or_no(query, ctx.author)
event = "reaction_add"
else:

View File

@@ -645,7 +645,7 @@ class Permissions(commands.Cog):
if ctx.guild is None or ctx.guild.me.permissions_in(ctx.channel).add_reactions:
msg = await ctx.send(_("Are you sure?"))
# noinspection PyAsyncCall
task = start_adding_reactions(msg, ReactionPredicate.YES_OR_NO_EMOJIS, ctx.bot.loop)
task = start_adding_reactions(msg, ReactionPredicate.YES_OR_NO_EMOJIS)
pred = ReactionPredicate.yes_or_no(msg, ctx.author)
try:
await ctx.bot.wait_for("reaction_add", check=pred, timeout=30)