From a1d4dad92e221dbc4c9b240b7363b023add8e4d1 Mon Sep 17 00:00:00 2001 From: Myned Date: Tue, 31 Oct 2017 15:10:36 -0400 Subject: [PATCH 1/2] Fixed footnote formatting --- src/main/cogs/booru.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/main/cogs/booru.py b/src/main/cogs/booru.py index 145d38d..191b861 100644 --- a/src/main/cogs/booru.py +++ b/src/main/cogs/booru.py @@ -668,7 +668,7 @@ class MsG: embed.set_image(url=values[c - 1]['url']) embed.set_author(name=pool['name'], url='https://e621.net/pool/show?id={}'.format(pool['id']), icon_url=ctx.author.avatar_url) - embed.set_footer(text='{} / {}'.format(values[c - 1]['score'], c, len(posts)), + embed.set_footer(text='{} / {}'.format(c, len(posts)), icon_url=self._get_score(values[c - 1]['score'])) paginator = await dest.send(embed=embed) @@ -700,7 +700,7 @@ class MsG: c -= 1 embed.title = values[c - 1]['artist'] embed.url = 'https://e621.net/post/show/{}'.format(keys[c - 1]) - embed.set_footer(text='{} / {}'.format(values[c - 1]['score'], c, len(posts)), + embed.set_footer(text='{} / {}'.format(c, len(posts)), icon_url=self._get_score(values[c - 1]['score'])) embed.set_image(url=values[c - 1]['url']) @@ -716,7 +716,7 @@ class MsG: await number.delete() embed.title = values[c - 1]['artist'] embed.url = 'https://e621.net/post/show/{}'.format(keys[c - 1]) - embed.set_footer(text='{} / {}'.format(values[c - 1]['score'], c, len(posts)), + embed.set_footer(text='{} / {}'.format(c, len(posts)), icon_url=self._get_score(values[c - 1]['score'])) embed.set_image(url=values[c - 1]['url']) @@ -727,7 +727,7 @@ class MsG: c += 1 embed.title = values[c - 1]['artist'] embed.url = 'https://e621.net/post/show/{}'.format(keys[c - 1]) - embed.set_footer(text='{} / {}'.format(values[c - 1]['score'], c, len(posts)), + embed.set_footer(text='{} / {}'.format(c, len(posts)), icon_url=self._get_score(values[c - 1]['score'])) embed.set_image(url=values[c - 1]['url']) @@ -811,7 +811,7 @@ class MsG: embed.set_image(url=values[c - 1]['url']) embed.set_author(name=formatter.tostring(tags, order=order), url='https://e621.net/post?tags={}'.format(','.join(tags)), icon_url=ctx.author.avatar_url) - embed.set_footer(text='{} / {}'.format(values[c - 1]['score'], c, len(posts)), + embed.set_footer(text='{} / {}'.format(c, len(posts)), icon_url=self._get_score(values[c - 1]['score'])) paginator = await dest.send(embed=embed) @@ -843,7 +843,7 @@ class MsG: c -= 1 embed.title = values[c - 1]['artist'] embed.url = 'https://e621.net/post/show/{}'.format(keys[c - 1]) - embed.set_footer(text='{} / {}'.format(values[c - 1]['score'], c, len(posts)), + embed.set_footer(text='{} / {}'.format(c, len(posts)), icon_url=self._get_score(values[c - 1]['score'])) embed.set_image(url=values[c - 1]['url']) @@ -859,7 +859,7 @@ class MsG: await number.delete() embed.title = values[c - 1]['artist'] embed.url = 'https://e621.net/post/show/{}'.format(keys[c - 1]) - embed.set_footer(text='{} / {}'.format(values[c - 1]['score'], c, len(posts)), + embed.set_footer(text='{} / {}'.format(c, len(posts)), icon_url=self._get_score(values[c - 1]['score'])) embed.set_image(url=values[c - 1]['url']) @@ -877,7 +877,7 @@ class MsG: c += 1 embed.title = values[c - 1]['artist'] embed.url = 'https://e621.net/post/show/{}'.format(keys[c - 1]) - embed.set_footer(text='{} / {}'.format(values[c - 1]['score'], c, len(posts)), + embed.set_footer(text='{} / {}'.format(c, len(posts)), icon_url=self._get_score(values[c - 1]['score'])) embed.set_image(url=values[c - 1]['url']) @@ -976,7 +976,7 @@ class MsG: embed.set_image(url=values[c - 1]['url']) embed.set_author(name=formatter.tostring(tags, order=order), url='https://e926.net/post?tags={}'.format(','.join(tags)), icon_url=ctx.author.avatar_url) - embed.set_footer(text='{} / {}'.format(values[c - 1]['score'], c, len(posts)), + embed.set_footer(text='{} / {}'.format(c, len(posts)), icon_url=self._get_score(values[c - 1]['score'])) paginator = await dest.send(embed=embed) @@ -1008,7 +1008,7 @@ class MsG: c -= 1 embed.title = values[c - 1]['artist'] embed.url = 'https://e926.net/post/show/{}'.format(keys[c - 1]) - embed.set_footer(text='{} / {}'.format(values[c - 1]['score'], c, len(posts)), + embed.set_footer(text='{} / {}'.format(c, len(posts)), icon_url=self._get_score(values[c - 1]['score'])) embed.set_image(url=values[c - 1]['url']) @@ -1024,7 +1024,7 @@ class MsG: await number.delete() embed.title = values[c - 1]['artist'] embed.url = 'https://e926.net/post/show/{}'.format(keys[c - 1]) - embed.set_footer(text='{} / {}'.format(values[c - 1]['score'], c, len(posts)), + embed.set_footer(text='{} / {}'.format(c, len(posts)), icon_url=self._get_score(values[c - 1]['score'])) embed.set_image(url=values[c - 1]['url']) @@ -1042,7 +1042,7 @@ class MsG: c += 1 embed.title = values[c - 1]['artist'] embed.url = 'https://e926.net/post/show/{}'.format(keys[c - 1]) - embed.set_footer(text='{} / {}'.format(values[c - 1]['score'], c, len(posts)), + embed.set_footer(text='{} / {}'.format(c, len(posts)), icon_url=self._get_score(values[c - 1]['score'])) embed.set_image(url=values[c - 1]['url']) From 91890a79e86608025603ce06453029d3beb0e1d6 Mon Sep 17 00:00:00 2001 From: Myned Date: Tue, 31 Oct 2017 15:12:19 -0400 Subject: [PATCH 2/2] Added image url suggestion on not found error --- src/main/cogs/booru.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/cogs/booru.py b/src/main/cogs/booru.py index 191b861..bae06d5 100644 --- a/src/main/cogs/booru.py +++ b/src/main/cogs/booru.py @@ -223,7 +223,7 @@ class MsG: await ctx.message.add_reaction('❌') except exc.MissingArgument: - await ctx.send('**Invalid url or file**', delete_after=10) + await ctx.send('**Invalid url or file** Be sure the link directs to an image file', delete_after=10) await ctx.message.add_reaction('❌') @commands.command(name='quality', aliases=['qual', 'qrev', 'qis']) @@ -271,7 +271,7 @@ class MsG: await ctx.message.add_reaction('❌') except exc.MissingArgument: - await ctx.send('**Invalid url or file**', delete_after=10) + await ctx.send('**Invalid url or file** Be sure the link directs to an image file', delete_after=10) await ctx.message.add_reaction('❌') @commands.command(name='reversify', aliases=['revify', 'risify', 'rify'])