From 389469bfbb73d126618b7e7f6d874bf65908b56e Mon Sep 17 00:00:00 2001 From: Myned Date: Tue, 17 Oct 2017 20:28:56 -0400 Subject: [PATCH 1/2] Import error --- src/main/utils/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/utils/utils.py b/src/main/utils/utils.py index 6cf6f40..0259c42 100644 --- a/src/main/utils/utils.py +++ b/src/main/utils/utils.py @@ -9,6 +9,8 @@ import aiohttp import discord as d from pync import Notifier +from misc import exceptions as exc + print('\nPID : {}\n'.format(os.getpid())) From eaf6d0cd9f3f40c466da9d9ae55d8a05715ccd4f Mon Sep 17 00:00:00 2001 From: Myned Date: Tue, 17 Oct 2017 20:29:30 -0400 Subject: [PATCH 2/2] Caught limit out of bounds --- src/main/cogs/booru.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/cogs/booru.py b/src/main/cogs/booru.py index fc4c69f..c74f59d 100644 --- a/src/main/cogs/booru.py +++ b/src/main/cogs/booru.py @@ -267,8 +267,8 @@ class MsG: except exc.NotFound: await ctx.send('**No matches found.**', delete_after=10) await ctx.message.add_reaction('❌') - except ValueError: - await ctx.send('**Invalid limit.**', delete_after=10) + except exc.BoundsError as e: + await ctx.send('`{}` **invalid limit.** Images limited to 20'.format(e), delete_after=10) await ctx.message.add_reaction('❌') @commands.command(name='qualitify', aliases=['qualify', 'qrevify', 'qrisify', 'qify']) @@ -341,9 +341,9 @@ class MsG: except exc.NotFound: await ctx.send('**No matches found.**', delete_after=10) await ctx.message.add_reaction('❌') - # except ValueError: - # await ctx.send('**Invalid limit.**', delete_after=10) - # await ctx.message.add_reaction('❌') + except exc.BoundsError as e: + await ctx.send('`{}` **invalid limit.** Images limited to 20'.format(e), delete_after=10) + await ctx.message.add_reaction('❌') async def _qualitify(self): while self.qualitifying: