From 3b77ba41bb52749b9f5da3c970b997304c7c37d0 Mon Sep 17 00:00:00 2001 From: Dustin Pianalto Date: Tue, 18 Aug 2020 01:27:37 -0800 Subject: [PATCH] Fix bug in broadcast --- geeksbot/exts/rcon.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/geeksbot/exts/rcon.py b/geeksbot/exts/rcon.py index 35d4c29..c68e772 100644 --- a/geeksbot/exts/rcon.py +++ b/geeksbot/exts/rcon.py @@ -601,6 +601,7 @@ class Rcon(commands.Cog): # noinspection PyShadowingNames futures = [] + error = False if server_name == 'all': message = ''.join(i for i in f'{ctx.author.display_name}: {message}' if ord(i) < 128) msg = await ctx.send(f'Broadcasting "{message}" to all servers.') @@ -618,8 +619,10 @@ class Rcon(commands.Cog): break else: await ctx.send('That server is not configured in this guild.') - self.bot.loop.create_task(asyncio.gather(*futures)) - await ctx.message.add_reaction('✅') + error = True + if not error: + await asyncio.gather(*futures, loop=self.bot.loop) + await ctx.message.add_reaction('✅') else: await ctx.send('You must include a message with this command.')