mirror of
https://github.com/myned/modufur.git
synced 2024-11-01 21:02:38 +00:00
Merge branch 'dev'
This commit is contained in:
commit
24d7b25bf4
2 changed files with 27 additions and 20 deletions
|
@ -875,6 +875,7 @@ class MsG:
|
|||
keys = list(posts.keys())
|
||||
values = list(posts.values())
|
||||
|
||||
if c < len(keys):
|
||||
c += 1
|
||||
embed.title = values[c - 1]['artist']
|
||||
embed.url = 'https://e621.net/post/show/{}'.format(keys[c - 1])
|
||||
|
@ -883,9 +884,9 @@ class MsG:
|
|||
embed.set_image(url=values[c - 1]['url'])
|
||||
|
||||
await paginator.edit(content='\N{HEAVY BLACK HEART}' if values[c - 1]['url'] in hearted else None, embed=embed)
|
||||
|
||||
except IndexError:
|
||||
else:
|
||||
await paginator.edit(content='**No more images found**')
|
||||
|
||||
except exc.NotFound:
|
||||
await paginator.edit(content='**No more images found**')
|
||||
|
||||
|
@ -1040,6 +1041,7 @@ class MsG:
|
|||
keys = list(posts.keys())
|
||||
values = list(posts.values())
|
||||
|
||||
if c < len(keys):
|
||||
c += 1
|
||||
embed.title = values[c - 1]['artist']
|
||||
embed.url = 'https://e926.net/post/show/{}'.format(keys[c - 1])
|
||||
|
@ -1048,9 +1050,9 @@ class MsG:
|
|||
embed.set_image(url=values[c - 1]['url'])
|
||||
|
||||
await paginator.edit(content='\N{HEAVY BLACK HEART}' if values[c - 1]['url'] in hearted else None, embed=embed)
|
||||
|
||||
except IndexError:
|
||||
else:
|
||||
await paginator.edit(content='**No more images found**')
|
||||
|
||||
except exc.NotFound:
|
||||
await paginator.edit(content='**No more images found**')
|
||||
|
||||
|
|
|
@ -20,14 +20,19 @@ from utils import utils as u
|
|||
# log.basicConfig(level=log.INFO)
|
||||
|
||||
|
||||
class HelpFormatter(commands.HelpFormatter):
|
||||
async def format():
|
||||
pass
|
||||
|
||||
|
||||
def get_prefix(bot, message):
|
||||
if isinstance(message.guild, d.Guild) and message.guild.id in u.settings['prefixes']:
|
||||
return u.settings['prefixes'][message.guild.id]
|
||||
return u.config['prefix']
|
||||
|
||||
|
||||
bot = commands.Bot(command_prefix=get_prefix, formatter=commands.HelpFormatter(
|
||||
show_check_failure=True), description='Experimental miscellaneous bot')
|
||||
help_formatter = HelpFormatter(show_check_failure=True)
|
||||
bot = commands.Bot(command_prefix=get_prefix, formatter=help_formatter, description='Experimental miscellaneous bot')
|
||||
|
||||
# Send and print ready message to #testing and console after logon
|
||||
|
||||
|
|
Loading…
Reference in a new issue