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

Merge branch 'dev'

This commit is contained in:
Myned 2017-10-31 16:14:01 -04:00
commit 0f76f92174
3 changed files with 10 additions and 10 deletions

View file

@ -573,6 +573,13 @@ class MsG:
blacklist.update(list(self.aliases[tag]) + [tag]) blacklist.update(list(self.aliases[tag]) + [tag])
for tag in self.blacklists['user_blacklist'].get(ctx.author.id, set()): for tag in self.blacklists['user_blacklist'].get(ctx.author.id, set()):
blacklist.update(list(self.aliases[tag]) + [tag]) blacklist.update(list(self.aliases[tag]) + [tag])
# Checks for, assigns, and removes first order in tags if possible
order = [tag for tag in tags if 'order:' in tag]
if order:
order = order[0]
tags.remove(order)
else:
order = 'order:random'
# Checks if tags are in local blacklists # Checks if tags are in local blacklists
if tags: if tags:
if (len(tags) > 5 and booru == 'e621') or (len(tags) > 4 and booru == 'e926'): if (len(tags) > 5 and booru == 'e621') or (len(tags) > 4 and booru == 'e926'):
@ -581,13 +588,6 @@ class MsG:
if tag == 'swf' or tag == 'webm' or tag in blacklist: if tag == 'swf' or tag == 'webm' or tag in blacklist:
raise exc.TagBlacklisted(tag) raise exc.TagBlacklisted(tag)
order = [tag for tag in tags if 'order:' in tag]
if order:
order = order[0]
tags.remove(order)
else:
order = 'order:random'
# Checks for blacklisted tags in endpoint blacklists - try/except is for continuing the parent loop # Checks for blacklisted tags in endpoint blacklists - try/except is for continuing the parent loop
posts = {} posts = {}
temposts = len(posts) temposts = len(posts)

View file

@ -39,7 +39,7 @@ class Bot:
# task.cancel() # task.cancel()
await self.bot.logout() await self.bot.logout()
u.close(self.bot.loop) u.close(self.bot.loop)
print('\n/ / / / / / / / / / / /\nD I S C O N N E C T E D\n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\\n') print('\n< < < < < < < < < < < <\nD I S C O N N E C T E D\n< < < < < < < < < < < <\n')
# u.notify('D I S C O N N E C T E D') # u.notify('D I S C O N N E C T E D')
@commands.command(name=',restart', aliases=[',res', ',r'], hidden=True) @commands.command(name=',restart', aliases=[',res', ',r'], hidden=True)
@ -48,7 +48,7 @@ class Bot:
async def restart(self, ctx): async def restart(self, ctx):
await ctx.message.add_reaction('💤') await ctx.message.add_reaction('💤')
print('\n| | | | | | | | | |\nR E S T A R T I N G\n| | | | | | | | | |\n') print('\n^ ^ ^ ^ ^ ^ ^ ^ ^ ^\nR E S T A R T I N G\n^ ^ ^ ^ ^ ^ ^ ^ ^ ^\n')
await self.bot.get_channel(u.config['info_channel']).send('**Restarting** 💤 . . .') await self.bot.get_channel(u.config['info_channel']).send('**Restarting** 💤 . . .')
# u.notify('R E S T A R T I N G') # u.notify('R E S T A R T I N G')

View file

@ -47,7 +47,7 @@ async def on_ready():
else: else:
await bot.change_presence(game=None) await bot.change_presence(game=None)
print('\n\\ \\ \\ \\ \\ \\ \\ \\ \\\nC O N N E C T E D : {}\n/ / / / / / / / /\n'.format(bot.user.name)) print('\n> > > > > > > > >\nC O N N E C T E D : {}\n> > > > > > > > >\n'.format(bot.user.name))
await bot.get_channel(u.config['info_channel']).send('**Started** ☀️ .') await bot.get_channel(u.config['info_channel']).send('**Started** ☀️ .')
# u.notify('C O N N E C T E D') # u.notify('C O N N E C T E D')
if u.temp: if u.temp: