From f76e4da5fc835ac10636e880bf139e341e5ec544 Mon Sep 17 00:00:00 2001 From: Myned Date: Tue, 17 Oct 2017 23:32:12 -0400 Subject: [PATCH 1/2] Comment change (because reasons) --- src/main/cogs/tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/cogs/tools.py b/src/main/cogs/tools.py index 6772b94..3a124cd 100644 --- a/src/main/cogs/tools.py +++ b/src/main/cogs/tools.py @@ -42,7 +42,7 @@ class Utils: print(command_dict) await ctx.invoke(command_dict.get(str(ctx.author.id), {}).get('command', None), args) - # [prefix]ping -> Pong! + # Displays latency @commands.command(aliases=['p'], brief='Pong!', description='Returns latency from bot to Discord servers, not to user') @checks.del_ctx() async def ping(self, ctx): From f96d36be0e3ef0036a4e5825d8e933a4abf7e206 Mon Sep 17 00:00:00 2001 From: Myned Date: Tue, 17 Oct 2017 23:32:32 -0400 Subject: [PATCH 2/2] Fixed appending to None --- src/main/cogs/booru.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/cogs/booru.py b/src/main/cogs/booru.py index c74f59d..3d65b16 100644 --- a/src/main/cogs/booru.py +++ b/src/main/cogs/booru.py @@ -53,11 +53,13 @@ class MsG: for tag in tags: tag_request = await u.fetch('https://e621.net/tag/related.json', params={'tags': tag, 'type': 'general'}, json=True) - for rel in tag_request.get(tag, [None]): + for rel in tag_request.get(tag, []): related.append(rel[0]) await dest.send('`{}` **related tags:**\n```\n{}```'.format(tag, formatter.tostring(related))) + await asyncio.sleep(self.RATE_LIMIT) + related.clear() await ctx.message.add_reaction('✅') @@ -79,6 +81,8 @@ class MsG: await dest.send('`{}` **aliases:**\n```\n{}```'.format(tag, formatter.tostring(aliases))) + await asyncio.sleep(self.RATE_LIMIT) + aliases.clear() await ctx.message.add_reaction('✅')