1
0
Fork 0
mirror of https://github.com/myned/modufur.git synced 2024-12-25 14:47:29 +00:00

Changed command completion reactions to globally activate for simplicity

This commit is contained in:
Myned 2017-11-19 11:49:32 -05:00
parent 5bb47547bd
commit 4a18ec2bae
5 changed files with 17 additions and 97 deletions

View file

@ -56,7 +56,6 @@ class MsG:
# #
# print('AUTO-POSTING : #{}'.format(ctx.channel.name)) # print('AUTO-POSTING : #{}'.format(ctx.channel.name))
# await ctx.send('**Auto-posting all images in {}**'.format(ctx.channel.mention), delete_after=5) # await ctx.send('**Auto-posting all images in {}**'.format(ctx.channel.mention), delete_after=5)
# await ctx.message.add_reaction('\N{WHITE HEAVY CHECK MARK}')
# else: # else:
# raise exc.Exists # raise exc.Exists
# #
@ -85,7 +84,6 @@ class MsG:
related.clear() related.clear()
await ctx.message.add_reaction('\N{WHITE HEAVY CHECK MARK}')
# Tag aliases # Tag aliases
@commands.command(name='aliases', aliases=['alias', 'als'], brief='e621 Tag aliases', description='e621 | NSFW\nSearch aliases for given tag') @commands.command(name='aliases', aliases=['alias', 'als'], brief='e621 Tag aliases', description='e621 | NSFW\nSearch aliases for given tag')
@ -108,7 +106,6 @@ class MsG:
aliases.clear() aliases.clear()
await ctx.message.add_reaction('\N{WHITE HEAVY CHECK MARK}')
@commands.command(name='getpool', aliases=['pool', 'getp', 'gp'], brief='e621 Search for pools', description='e621 | NSFW\nReturn pool for query', usage='[related|rel]') @commands.command(name='getpool', aliases=['pool', 'getp', 'gp'], brief='e621 Search for pools', description='e621 | NSFW\nReturn pool for query', usage='[related|rel]')
@checks.del_ctx() @checks.del_ctx()
@ -150,7 +147,6 @@ class MsG:
raise exc.NotFound raise exc.NotFound
await ctx.send(f'**{tempool["name"]}**\nhttps://e621.net/pool/show/{tempool["id"]}') await ctx.send(f'**{tempool["name"]}**\nhttps://e621.net/pool/show/{tempool["id"]}')
await ctx.message.add_reaction('\N{WHITE HEAVY CHECK MARK}')
except exc.Abort as e: except exc.Abort as e:
await e.message.edit(content='**Search aborted**', delete_after=10) await e.message.edit(content='**Search aborted**', delete_after=10)
@ -174,7 +170,6 @@ class MsG:
finally: finally:
await asyncio.sleep(self.RATE_LIMIT) await asyncio.sleep(self.RATE_LIMIT)
await ctx.message.add_reaction('\N{WHITE HEAVY CHECK MARK}')
except exc.MissingArgument: except exc.MissingArgument:
await ctx.send('**Invalid url or file**', delete_after=10) await ctx.send('**Invalid url or file**', delete_after=10)
@ -216,10 +211,6 @@ class MsG:
except exc.MatchError as e: except exc.MatchError as e:
await ctx.send('**No probable match for:** `{}`'.format(e), delete_after=10) await ctx.send('**No probable match for:** `{}`'.format(e), delete_after=10)
if c:
await ctx.message.add_reaction('\N{WHITE HEAVY CHECK MARK}')
else:
await ctx.message.add_reaction('\N{CROSS MARK}')
except exc.MissingArgument: except exc.MissingArgument:
await ctx.send('**Invalid url or file** Be sure the link directs to an image file', delete_after=10) await ctx.send('**Invalid url or file** Be sure the link directs to an image file', delete_after=10)
@ -264,9 +255,6 @@ class MsG:
except exc.MatchError as e: except exc.MatchError as e:
await ctx.send('**No probable match for:** `{}`'.format(e), delete_after=10) await ctx.send('**No probable match for:** `{}`'.format(e), delete_after=10)
if c:
await ctx.message.add_reaction('\N{WHITE HEAVY CHECK MARK}')
else:
await ctx.message.add_reaction('\N{CROSS MARK}') await ctx.message.add_reaction('\N{CROSS MARK}')
except exc.MissingArgument: except exc.MissingArgument:
@ -327,10 +315,6 @@ class MsG:
finally: finally:
n += 1 n += 1
if c > 0:
await ctx.message.add_reaction('\N{WHITE HEAVY CHECK MARK}')
else:
await ctx.message.add_reaction('\N{CROSS MARK}')
except exc.NotFound: except exc.NotFound:
await ctx.send('**No matches found**', delete_after=10) await ctx.send('**No matches found**', delete_after=10)
@ -395,9 +379,6 @@ class MsG:
finally: finally:
n += 1 n += 1
if c > 0:
await ctx.message.add_reaction('\N{WHITE HEAVY CHECK MARK}')
else:
await ctx.message.add_reaction('\N{CROSS MARK}') await ctx.message.add_reaction('\N{CROSS MARK}')
except exc.NotFound: except exc.NotFound:
@ -477,7 +458,6 @@ class MsG:
print('AUTO-QUALITIFYING : #{}'.format(ctx.channel.name)) print('AUTO-QUALITIFYING : #{}'.format(ctx.channel.name))
await ctx.send('**Auto-qualitifying all images in** {}'.format(ctx.channel.mention), delete_after=5) await ctx.send('**Auto-qualitifying all images in** {}'.format(ctx.channel.mention), delete_after=5)
await ctx.message.add_reaction('\N{WHITE HEAVY CHECK MARK}')
else: else:
raise exc.Exists raise exc.Exists
@ -736,17 +716,11 @@ class MsG:
await paginator.edit(content='**Exited paginator**') await paginator.edit(content='**Exited paginator**')
except UnboundLocalError: except UnboundLocalError:
await dest.send('**Exited paginator**') await dest.send('**Exited paginator**')
if not hearted:
await ctx.message.add_reaction('\N{WHITE HEAVY CHECK MARK}')
except asyncio.TimeoutError: except asyncio.TimeoutError:
try: try:
await paginator.edit(content='**Paginator timed out**') await paginator.edit(content='**Paginator timed out**')
except UnboundLocalError: except UnboundLocalError:
await dest.send('**Paginator timed out**') await dest.send('**Paginator timed out**')
if not hearted:
await ctx.message.add_reaction('\N{WHITE HEAVY CHECK MARK}')
except exc.NotFound: except exc.NotFound:
await ctx.send('**Pool not found**', delete_after=10) await ctx.send('**Pool not found**', delete_after=10)
await ctx.message.add_reaction('\N{CROSS MARK}') await ctx.message.add_reaction('\N{CROSS MARK}')
@ -765,7 +739,6 @@ class MsG:
await asyncio.sleep(self.RATE_LIMIT) await asyncio.sleep(self.RATE_LIMIT)
await ctx.message.add_reaction('\N{WHITE HEAVY CHECK MARK}')
@commands.command(name='e621page', aliases=['e621p', 'e6p', '6p']) @commands.command(name='e621page', aliases=['e621p', 'e6p', '6p'])
@checks.del_ctx() @checks.del_ctx()
@ -889,17 +862,11 @@ class MsG:
await paginator.edit(content='**Exited paginator**') await paginator.edit(content='**Exited paginator**')
except UnboundLocalError: except UnboundLocalError:
await dest.send('**Exited paginator**') await dest.send('**Exited paginator**')
if not hearted:
await ctx.message.add_reaction('\N{WHITE HEAVY CHECK MARK}')
except asyncio.TimeoutError: except asyncio.TimeoutError:
try: try:
await paginator.edit(content='**Paginator timed out**') await paginator.edit(content='**Paginator timed out**')
except UnboundLocalError: except UnboundLocalError:
await dest.send('**Paginator timed out**') await dest.send('**Paginator timed out**')
if not hearted:
await ctx.message.add_reaction('\N{WHITE HEAVY CHECK MARK}')
except exc.NotFound as e: except exc.NotFound as e:
await ctx.send('`{}` **not found**'.format(e), delete_after=10) await ctx.send('`{}` **not found**'.format(e), delete_after=10)
await ctx.message.add_reaction('\N{CROSS MARK}') await ctx.message.add_reaction('\N{CROSS MARK}')
@ -925,7 +892,6 @@ class MsG:
await asyncio.sleep(self.RATE_LIMIT) await asyncio.sleep(self.RATE_LIMIT)
await ctx.message.add_reaction('\N{WHITE HEAVY CHECK MARK}')
# @e621_paginator.error # @e621_paginator.error
# async def e621_paginator_error(self, ctx, error): # async def e621_paginator_error(self, ctx, error):
@ -1054,17 +1020,11 @@ class MsG:
await paginator.edit(content='**Exited paginator**') await paginator.edit(content='**Exited paginator**')
except UnboundLocalError: except UnboundLocalError:
await dest.send('**Exited paginator**') await dest.send('**Exited paginator**')
if not hearted:
await ctx.message.add_reaction('\N{WHITE HEAVY CHECK MARK}')
except asyncio.TimeoutError: except asyncio.TimeoutError:
try: try:
await paginator.edit(content='**Paginator timed out**') await paginator.edit(content='**Paginator timed out**')
except UnboundLocalError: except UnboundLocalError:
await dest.send('**Paginator timed out**') await dest.send('**Paginator timed out**')
if not hearted:
await ctx.message.add_reaction('\N{WHITE HEAVY CHECK MARK}')
except exc.NotFound as e: except exc.NotFound as e:
await ctx.send('`{}` **not found**'.format(e), delete_after=10) await ctx.send('`{}` **not found**'.format(e), delete_after=10)
await ctx.message.add_reaction('\N{CROSS MARK}') await ctx.message.add_reaction('\N{CROSS MARK}')
@ -1090,7 +1050,6 @@ class MsG:
await asyncio.sleep(self.RATE_LIMIT) await asyncio.sleep(self.RATE_LIMIT)
await ctx.message.add_reaction('\N{WHITE HEAVY CHECK MARK}')
# Searches for and returns images from e621.net given tags when not blacklisted # Searches for and returns images from e621.net given tags when not blacklisted
@commands.group(aliases=['e6', '6'], brief='e621 | NSFW', description='e621 | NSFW\nTag-based search for e621.net\n\nYou can only search 5 tags and 6 images at once for now.\ne6 [tags...] ([# of images])') @commands.group(aliases=['e6', '6'], brief='e621 | NSFW', description='e621 | NSFW\nTag-based search for e621.net\n\nYou can only search 5 tags and 6 images at once for now.\ne6 [tags...] ([# of images])')
@ -1117,8 +1076,6 @@ class MsG:
await dest.send(embed=embed) await dest.send(embed=embed)
await ctx.message.add_reaction('\N{WHITE HEAVY CHECK MARK}')
except exc.TagBlacklisted as e: except exc.TagBlacklisted as e:
await ctx.send('`{}` **blacklisted**'.format(e), delete_after=10) await ctx.send('`{}` **blacklisted**'.format(e), delete_after=10)
await ctx.message.add_reaction('\N{CROSS MARK}') await ctx.message.add_reaction('\N{CROSS MARK}')
@ -1171,8 +1128,6 @@ class MsG:
await dest.send(embed=embed) await dest.send(embed=embed)
await ctx.message.add_reaction('\N{WHITE HEAVY CHECK MARK}')
except exc.TagBlacklisted as e: except exc.TagBlacklisted as e:
await ctx.send('`{}` **blacklisted**'.format(e), delete_after=10) await ctx.send('`{}` **blacklisted**'.format(e), delete_after=10)
await ctx.message.add_reaction('\N{CROSS MARK}') await ctx.message.add_reaction('\N{CROSS MARK}')
@ -1212,7 +1167,6 @@ class MsG:
dest = u.get_kwargs(ctx, args)['destination'] dest = u.get_kwargs(ctx, args)['destination']
await dest.send('\N{WHITE MEDIUM STAR} {}**\'s favorite tags:**\n```\n{}```'.format(ctx.author.mention, formatter.tostring(self.favorites.get(ctx.author.id, {}).get('tags', set()))), delete_after=10) await dest.send('\N{WHITE MEDIUM STAR} {}**\'s favorite tags:**\n```\n{}```'.format(ctx.author.mention, formatter.tostring(self.favorites.get(ctx.author.id, {}).get('tags', set()))), delete_after=10)
await ctx.message.add_reaction('\N{WHITE HEAVY CHECK MARK}')
@_get_favorite.command(name='posts', aliases=['p']) @_get_favorite.command(name='posts', aliases=['p'])
async def __get_favorite_posts(self, ctx): async def __get_favorite_posts(self, ctx):
@ -1238,7 +1192,6 @@ class MsG:
u.dump(self.favorites, 'cogs/favorites.pkl') u.dump(self.favorites, 'cogs/favorites.pkl')
await dest.send('{} **added to their favorites:**\n```\n{}```'.format(ctx.author.mention, formatter.tostring(tags)), delete_after=5) await dest.send('{} **added to their favorites:**\n```\n{}```'.format(ctx.author.mention, formatter.tostring(tags)), delete_after=5)
await ctx.message.add_reaction('\N{WHITE HEAVY CHECK MARK}')
except exc.BoundsError: except exc.BoundsError:
await ctx.send('**Favorites list currently limited to:** `5`', delete_after=10) await ctx.send('**Favorites list currently limited to:** `5`', delete_after=10)
@ -1271,7 +1224,6 @@ class MsG:
u.dump(self.favorites, 'cogs/favorites.pkl') u.dump(self.favorites, 'cogs/favorites.pkl')
await dest.send('{} **removed from their favorites:**\n```\n{}```'.format(ctx.author.mention, formatter.tostring(tags)), delete_after=5) await dest.send('{} **removed from their favorites:**\n```\n{}```'.format(ctx.author.mention, formatter.tostring(tags)), delete_after=5)
await ctx.message.add_reaction('\N{WHITE HEAVY CHECK MARK}')
except exc.TagError as e: except exc.TagError as e:
await ctx.send('`{}` **not in favorites**'.format(e), delete_after=10) await ctx.send('`{}` **not in favorites**'.format(e), delete_after=10)
@ -1294,7 +1246,6 @@ class MsG:
u.dump(self.favorites, 'cogs/favorites.pkl') u.dump(self.favorites, 'cogs/favorites.pkl')
await dest.send('{}**\'s favorites cleared**'.format(ctx.author.mention), delete_after=5) await dest.send('{}**\'s favorites cleared**'.format(ctx.author.mention), delete_after=5)
await ctx.message.add_reaction('\N{WHITE HEAVY CHECK MARK}')
@_clear_favorite.command(name='posts', aliases=['p']) @_clear_favorite.command(name='posts', aliases=['p'])
async def __clear_favorite_posts(self, ctx): async def __clear_favorite_posts(self, ctx):
@ -1324,7 +1275,6 @@ class MsG:
dest = u.get_kwargs(ctx, args)['destination'] dest = u.get_kwargs(ctx, args)['destination']
await dest.send('\N{NO ENTRY SIGN} **Global blacklist:**\n```\n{}```'.format(formatter.tostring(self.blacklists['global_blacklist']))) await dest.send('\N{NO ENTRY SIGN} **Global blacklist:**\n```\n{}```'.format(formatter.tostring(self.blacklists['global_blacklist'])))
await ctx.message.add_reaction('\N{WHITE HEAVY CHECK MARK}')
@_get_blacklist.command(name='channel', aliases=['ch', 'c']) @_get_blacklist.command(name='channel', aliases=['ch', 'c'])
async def __get_channel_blacklist(self, ctx, *args): async def __get_channel_blacklist(self, ctx, *args):
@ -1334,14 +1284,12 @@ class MsG:
ctx.guild, d.Guild) else ctx.channel ctx.guild, d.Guild) else ctx.channel
await dest.send('\N{NO ENTRY SIGN} {} **blacklist:**\n```\n{}```'.format(ctx.channel.mention, formatter.tostring(self.blacklists['guild_blacklist'].get(guild.id, {}).get(ctx.channel.id, set())))) await dest.send('\N{NO ENTRY SIGN} {} **blacklist:**\n```\n{}```'.format(ctx.channel.mention, formatter.tostring(self.blacklists['guild_blacklist'].get(guild.id, {}).get(ctx.channel.id, set()))))
await ctx.message.add_reaction('\N{WHITE HEAVY CHECK MARK}')
@_get_blacklist.command(name='me', aliases=['m']) @_get_blacklist.command(name='me', aliases=['m'])
async def __get_user_blacklist(self, ctx, *args): async def __get_user_blacklist(self, ctx, *args):
dest = u.get_kwargs(ctx, args)['destination'] dest = u.get_kwargs(ctx, args)['destination']
await dest.send('\N{NO ENTRY SIGN} {}**\'s blacklist:**\n```\n{}```'.format(ctx.author.mention, formatter.tostring(self.blacklists['user_blacklist'].get(ctx.author.id, set()))), delete_after=10) await dest.send('\N{NO ENTRY SIGN} {}**\'s blacklist:**\n```\n{}```'.format(ctx.author.mention, formatter.tostring(self.blacklists['user_blacklist'].get(ctx.author.id, set()))), delete_after=10)
await ctx.message.add_reaction('\N{WHITE HEAVY CHECK MARK}')
@_get_blacklist.command(name='here', aliases=['h']) @_get_blacklist.command(name='here', aliases=['h'])
async def __get_here_blacklists(self, ctx, *args): async def __get_here_blacklists(self, ctx, *args):
@ -1351,7 +1299,6 @@ class MsG:
ctx.guild, d.Guild) else ctx.channel ctx.guild, d.Guild) else ctx.channel
await dest.send('\N{NO ENTRY SIGN} **__Blacklisted:__**\n\n**Global:**\n```\n{}```\n**{}:**\n```\n{}```'.format(formatter.tostring(self.blacklists['global_blacklist']), ctx.channel.mention, formatter.tostring(self.blacklists['guild_blacklist'].get(guild.id, {}).get(ctx.channel.id, set())))) await dest.send('\N{NO ENTRY SIGN} **__Blacklisted:__**\n\n**Global:**\n```\n{}```\n**{}:**\n```\n{}```'.format(formatter.tostring(self.blacklists['global_blacklist']), ctx.channel.mention, formatter.tostring(self.blacklists['guild_blacklist'].get(guild.id, {}).get(ctx.channel.id, set()))))
await ctx.message.add_reaction('\N{WHITE HEAVY CHECK MARK}')
@_get_blacklist.group(name='all', aliases=['a']) @_get_blacklist.group(name='all', aliases=['a'])
async def __get_all_blacklists(self, ctx): async def __get_all_blacklists(self, ctx):
@ -1368,7 +1315,6 @@ class MsG:
ctx.guild, d.Guild) else ctx.channel ctx.guild, d.Guild) else ctx.channel
await dest.send('\N{NO ENTRY SIGN} **__{} blacklists:__**\n\n{}'.format(guild.name, formatter.dict_tostring(self.blacklists['guild_blacklist'].get(guild.id, {})))) await dest.send('\N{NO ENTRY SIGN} **__{} blacklists:__**\n\n{}'.format(guild.name, formatter.dict_tostring(self.blacklists['guild_blacklist'].get(guild.id, {}))))
await ctx.message.add_reaction('\N{WHITE HEAVY CHECK MARK}')
@__get_all_blacklists.command(name='user', aliases=['u', 'member', 'm']) @__get_all_blacklists.command(name='user', aliases=['u', 'member', 'm'])
@commands.is_owner() @commands.is_owner()
@ -1376,7 +1322,6 @@ class MsG:
dest = u.get_kwargs(ctx, args)['destination'] dest = u.get_kwargs(ctx, args)['destination']
await dest.send('\N{NO ENTRY SIGN} **__User blacklists:__**\n\n{}'.format(formatter.dict_tostring(self.blacklists['user_blacklist']))) await dest.send('\N{NO ENTRY SIGN} **__User blacklists:__**\n\n{}'.format(formatter.dict_tostring(self.blacklists['user_blacklist'])))
await ctx.message.add_reaction('\N{WHITE HEAVY CHECK MARK}')
@blacklist.group(name='add', aliases=['a']) @blacklist.group(name='add', aliases=['a'])
async def _add_tags(self, ctx): async def _add_tags(self, ctx):
@ -1404,7 +1349,6 @@ class MsG:
u.dump(self.aliases, 'cogs/aliases.pkl') u.dump(self.aliases, 'cogs/aliases.pkl')
await dest.send('**Added to global blacklist:**\n```\n{}```'.format(formatter.tostring(tags)), delete_after=5) await dest.send('**Added to global blacklist:**\n```\n{}```'.format(formatter.tostring(tags)), delete_after=5)
await ctx.message.add_reaction('\N{WHITE HEAVY CHECK MARK}')
@_add_tags.command(name='channel', aliases=['ch', 'c']) @_add_tags.command(name='channel', aliases=['ch', 'c'])
@commands.has_permissions(manage_channels=True) @commands.has_permissions(manage_channels=True)
@ -1430,7 +1374,6 @@ class MsG:
u.dump(self.aliases, 'cogs/aliases.pkl') u.dump(self.aliases, 'cogs/aliases.pkl')
await dest.send('**Added to** {} **blacklist:**\n```\n{}```'.format(ctx.channel.mention, formatter.tostring(tags)), delete_after=5) await dest.send('**Added to** {} **blacklist:**\n```\n{}```'.format(ctx.channel.mention, formatter.tostring(tags)), delete_after=5)
await ctx.message.add_reaction('\N{WHITE HEAVY CHECK MARK}')
@_add_tags.command(name='me', aliases=['m']) @_add_tags.command(name='me', aliases=['m'])
async def __add_user_tags(self, ctx, *args): async def __add_user_tags(self, ctx, *args):
@ -1451,7 +1394,6 @@ class MsG:
u.dump(self.aliases, 'cogs/aliases.pkl') u.dump(self.aliases, 'cogs/aliases.pkl')
await dest.send('{} **added to their blacklist:**\n```\n{}```'.format(ctx.author.mention, formatter.tostring(tags)), delete_after=5) await dest.send('{} **added to their blacklist:**\n```\n{}```'.format(ctx.author.mention, formatter.tostring(tags)), delete_after=5)
await ctx.message.add_reaction('\N{WHITE HEAVY CHECK MARK}')
@blacklist.group(name='remove', aliases=['rm', 'r']) @blacklist.group(name='remove', aliases=['rm', 'r'])
async def _remove_tags(self, ctx): async def _remove_tags(self, ctx):
@ -1476,7 +1418,6 @@ class MsG:
u.dump(self.blacklists, 'cogs/blacklists.pkl') u.dump(self.blacklists, 'cogs/blacklists.pkl')
await dest.send('**Removed from global blacklist:**\n```\n{}```'.format(formatter.tostring(tags)), delete_after=5) await dest.send('**Removed from global blacklist:**\n```\n{}```'.format(formatter.tostring(tags)), delete_after=5)
await ctx.message.add_reaction('\N{WHITE HEAVY CHECK MARK}')
except exc.TagError as e: except exc.TagError as e:
await ctx.send('`{}` **not in blacklist**'.format(e), delete_after=10) await ctx.send('`{}` **not in blacklist**'.format(e), delete_after=10)
@ -1502,7 +1443,6 @@ class MsG:
u.dump(self.blacklists, 'cogs/blacklists.pkl') u.dump(self.blacklists, 'cogs/blacklists.pkl')
await dest.send('**Removed from** {} **blacklist:**\n```\n{}```'.format(ctx.channel.mention, formatter.tostring(tags), delete_after=5)) await dest.send('**Removed from** {} **blacklist:**\n```\n{}```'.format(ctx.channel.mention, formatter.tostring(tags), delete_after=5))
await ctx.message.add_reaction('\N{WHITE HEAVY CHECK MARK}')
except exc.TagError as e: except exc.TagError as e:
await ctx.send('`{}` **not in blacklist**'.format(e), delete_after=10) await ctx.send('`{}` **not in blacklist**'.format(e), delete_after=10)
@ -1524,7 +1464,6 @@ class MsG:
u.dump(self.blacklists, 'cogs/blacklists.pkl') u.dump(self.blacklists, 'cogs/blacklists.pkl')
await dest.send('{} **removed from their blacklist:**\n```\n{}```'.format(ctx.author.mention, formatter.tostring(tags)), delete_after=5) await dest.send('{} **removed from their blacklist:**\n```\n{}```'.format(ctx.author.mention, formatter.tostring(tags)), delete_after=5)
await ctx.message.add_reaction('\N{WHITE HEAVY CHECK MARK}')
except exc.TagError as e: except exc.TagError as e:
await ctx.send('`{}` **not in blacklist**'.format(e), delete_after=10) await ctx.send('`{}` **not in blacklist**'.format(e), delete_after=10)
@ -1545,7 +1484,6 @@ class MsG:
u.dump(self.blacklists, 'cogs/blacklists.pkl') u.dump(self.blacklists, 'cogs/blacklists.pkl')
await dest.send('**Global blacklist cleared**', delete_after=5) await dest.send('**Global blacklist cleared**', delete_after=5)
await ctx.message.add_reaction('\N{WHITE HEAVY CHECK MARK}')
@_clear_blacklist.command(name='channel', aliases=['ch', 'c']) @_clear_blacklist.command(name='channel', aliases=['ch', 'c'])
@commands.has_permissions(manage_channels=True) @commands.has_permissions(manage_channels=True)
@ -1560,7 +1498,6 @@ class MsG:
u.dump(self.blacklists, 'cogs/blacklists.pkl') u.dump(self.blacklists, 'cogs/blacklists.pkl')
await dest.send('{} **blacklist cleared**'.format(ctx.channel.mention), delete_after=5) await dest.send('{} **blacklist cleared**'.format(ctx.channel.mention), delete_after=5)
await ctx.message.add_reaction('\N{WHITE HEAVY CHECK MARK}')
@_clear_blacklist.command(name='me', aliases=['m']) @_clear_blacklist.command(name='me', aliases=['m'])
async def __clear_user_blacklist(self, ctx, *args): async def __clear_user_blacklist(self, ctx, *args):
@ -1571,4 +1508,3 @@ class MsG:
u.dump(self.blacklists, 'cogs/blacklists.pkl') u.dump(self.blacklists, 'cogs/blacklists.pkl')
await dest.send('{}**\'s blacklist cleared**'.format(ctx.author.mention), delete_after=5) await dest.send('{}**\'s blacklist cleared**'.format(ctx.author.mention), delete_after=5)
await ctx.message.add_reaction('\N{WHITE HEAVY CHECK MARK}')

View file

@ -99,7 +99,6 @@ class Administration:
await del_sent.unpin() await del_sent.unpin()
await ctx.send('\N{WASTEBASKET} `{}` **of** <@{}>**\'s messages left in** {}****'.format(len(history) - c, user, ctx.guild.name)) await ctx.send('\N{WASTEBASKET} `{}` **of** <@{}>**\'s messages left in** {}****'.format(len(history) - c, user, ctx.guild.name))
await ctx.message.add_reaction('\N{WHITE HEAVY CHECK MARK}')
except exc.CheckFail: except exc.CheckFail:
await ctx.send('**Deletion aborted**', delete_after=10) await ctx.send('**Deletion aborted**', delete_after=10)
@ -160,7 +159,6 @@ class Administration:
self.deleting = True self.deleting = True
print('AUTO-DELETING : #{}'.format(ctx.channel.id)) print('AUTO-DELETING : #{}'.format(ctx.channel.id))
await ctx.send('**Auto-deleting all messages in {}**'.format(ctx.channel.mention), delete_after=5) await ctx.send('**Auto-deleting all messages in {}**'.format(ctx.channel.mention), delete_after=5)
await ctx.message.add_reaction('\N{WHITE HEAVY CHECK MARK}')
else: else:
raise exc.Exists raise exc.Exists
@ -178,7 +176,6 @@ class Administration:
u.dump(u.settings, 'settings.pkl') u.dump(u.settings, 'settings.pkl')
await ctx.send('**Delete command invocations:** `{}`'.format(ctx.guild.id in u.settings['del_ctx'])) await ctx.send('**Delete command invocations:** `{}`'.format(ctx.guild.id in u.settings['del_ctx']))
await ctx.message.add_reaction('\N{WHITE HEAVY CHECK MARK}')
@commands.command(name='setprefix', aliases=['setpre', 'spre']) @commands.command(name='setprefix', aliases=['setpre', 'spre'])
@commands.has_permissions(administrator=True) @commands.has_permissions(administrator=True)
@ -190,4 +187,3 @@ class Administration:
del u.settings['prefixes'][ctx.guild.id] del u.settings['prefixes'][ctx.guild.id]
await ctx.send(f'**Prefix set to:** `{"` or `".join(prefix if ctx.guild.id in u.settings["prefixes"] else u.config["prefix"])}`') await ctx.send(f'**Prefix set to:** `{"` or `".join(prefix if ctx.guild.id in u.settings["prefixes"] else u.config["prefix"])}`')
await ctx.message.add_reaction('')

View file

@ -85,8 +85,6 @@ class Bot:
u.config['playing'] = 'None' u.config['playing'] = 'None'
u.dump(u.config, 'config.json', json=True) u.dump(u.config, 'config.json', json=True)
await ctx.message.add_reaction('\N{WHITE HEAVY CHECK MARK}')
class Tools: class Tools:
@ -189,8 +187,6 @@ class Tools:
sys.stderr = sys.__stderr__ sys.stderr = sys.__stderr__
print('Reset sys output.') print('Reset sys output.')
await ctx.message.add_reaction('\N{WHITE HEAVY CHECK MARK}')
@commands.command(name=',execute', aliases=[',exec'], hidden=True) @commands.command(name=',execute', aliases=[',exec'], hidden=True)
@commands.is_owner() @commands.is_owner()
@checks.del_ctx() @checks.del_ctx()
@ -203,9 +199,6 @@ class Tools:
except Exception: except Exception:
await ctx.send('```\n{}```'.format(tb.format_exc())) await ctx.send('```\n{}```'.format(tb.format_exc()))
finally:
await ctx.message.add_reaction('\N{WHITE HEAVY CHECK MARK}')
@commands.command(name=',evaluate', aliases=[',eval'], hidden=True) @commands.command(name=',evaluate', aliases=[',eval'], hidden=True)
@commands.is_owner() @commands.is_owner()
@checks.del_ctx() @checks.del_ctx()
@ -218,9 +211,6 @@ class Tools:
except Exception: except Exception:
await ctx.send('```\n{}```'.format(tb.format_exc())) await ctx.send('```\n{}```'.format(tb.format_exc()))
finally:
await ctx.message.add_reaction('\N{WHITE HEAVY CHECK MARK}')
@commands.group(aliases=[',db'], hidden=True) @commands.group(aliases=[',db'], hidden=True)
@commands.is_owner() @commands.is_owner()
@checks.del_ctx() @checks.del_ctx()

View file

@ -57,7 +57,6 @@ class Utils:
@checks.del_ctx() @checks.del_ctx()
async def prefix(self, ctx): async def prefix(self, ctx):
await ctx.send('**Prefix:** `{}`'.format('` or `'.join(u.settings['prefixes'][ctx.guild.id] if ctx.guild.id in u.settings['prefixes'] else u.config['prefix']))) await ctx.send('**Prefix:** `{}`'.format('` or `'.join(u.settings['prefixes'][ctx.guild.id] if ctx.guild.id in u.settings['prefixes'] else u.config['prefix'])))
await ctx.message.add_reaction('\N{WHITE HEAVY CHECK MARK}')
@commands.group(name=',send', aliases=[',s'], hidden=True) @commands.group(name=',send', aliases=[',s'], hidden=True)
@commands.is_owner() @commands.is_owner()
@ -73,7 +72,6 @@ class Utils:
try: try:
await tempchannel.send(message) await tempchannel.send(message)
await ctx.message.add_reaction('\N{WHITE HEAVY CHECK MARK}')
except AttributeError: except AttributeError:
await ctx.send('**Invalid channel**', delete_after=10) await ctx.send('**Invalid channel**', delete_after=10)
@ -86,7 +84,6 @@ class Utils:
@send.command(name='user', aliases=['u', 'member', 'm']) @send.command(name='user', aliases=['u', 'member', 'm'])
async def send_user(self, ctx, user, *, message): async def send_user(self, ctx, user, *, message):
await d.utils.get(self.bot.get_all_members(), id=int(user)).send(message) await d.utils.get(self.bot.get_all_members(), id=int(user)).send(message)
await ctx.message.add_reaction('\N{WHITE HEAVY CHECK MARK}')
@commands.command(aliases=['authenticateupload', 'authupload', 'authup', 'auth']) @commands.command(aliases=['authenticateupload', 'authupload', 'authup', 'auth'])
async def authenticate_upload(self, ctx): async def authenticate_upload(self, ctx):

View file

@ -107,6 +107,7 @@ async def on_command_error(ctx, error):
@bot.event @bot.event
async def on_command_completion(ctx): async def on_command_completion(ctx):
await ctx.message.add_reaction('\N{WHITE HEAVY CHECK MARK}')
if ctx.command.name != 'lastcommand': if ctx.command.name != 'lastcommand':
u.last_commands[ctx.author.id] = ctx u.last_commands[ctx.author.id] = ctx