mirror of
https://github.com/myned/modufur.git
synced 2024-12-24 22:27:28 +00:00
Order of logging for most important logs
This commit is contained in:
parent
b9955b1c6c
commit
993dde4f73
1 changed files with 5 additions and 8 deletions
|
@ -29,7 +29,6 @@ class Bot:
|
||||||
async def die(self, ctx):
|
async def die(self, ctx):
|
||||||
await ctx.message.add_reaction('🌙')
|
await ctx.message.add_reaction('🌙')
|
||||||
|
|
||||||
if isinstance(self.bot.get_channel(u.config['info_channel']), d.TextChannel):
|
|
||||||
await self.bot.get_channel(u.config['info_channel']).send('**Shutting down** 🌙 . . .')
|
await self.bot.get_channel(u.config['info_channel']).send('**Shutting down** 🌙 . . .')
|
||||||
# loop = self.bot.loop.all_tasks()
|
# loop = self.bot.loop.all_tasks()
|
||||||
# for task in loop:
|
# for task in loop:
|
||||||
|
@ -46,14 +45,13 @@ class Bot:
|
||||||
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')
|
||||||
if isinstance(self.bot.get_channel(u.config['info_channel']), d.TextChannel):
|
|
||||||
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.temp['restart_ch'] = ctx.channel.id
|
u.temp['restart_ch'] = ctx.channel.id
|
||||||
u.temp['restart_msg'] = ctx.message.id
|
u.temp['restart_msg'] = ctx.message.id
|
||||||
u.dump(u.temp, 'temp/temp.pkl')
|
u.dump(u.temp, 'temp/temp.pkl')
|
||||||
|
|
||||||
# u.notify('R E S T A R T I N G')
|
|
||||||
# loop = self.bot.loop.all_tasks()
|
# loop = self.bot.loop.all_tasks()
|
||||||
# for task in loop:
|
# for task in loop:
|
||||||
# task.cancel()
|
# task.cancel()
|
||||||
|
@ -102,7 +100,7 @@ class Tools:
|
||||||
|
|
||||||
async def refresh(self, m, i='', o=''):
|
async def refresh(self, m, i='', o=''):
|
||||||
global nl
|
global nl
|
||||||
output = m.content[10:-3]
|
output = m.content[10:-2]
|
||||||
if len(nl.findall(output)) <= 20:
|
if len(nl.findall(output)) <= 20:
|
||||||
await m.edit(content='```python\n{}\n{}\n>>>```'.format(output, self.format(i, o)))
|
await m.edit(content='```python\n{}\n{}\n>>>```'.format(output, self.format(i, o)))
|
||||||
else:
|
else:
|
||||||
|
@ -136,7 +134,6 @@ class Tools:
|
||||||
exe = await self.bot.wait_for('message', check=execute)
|
exe = await self.bot.wait_for('message', check=execute)
|
||||||
except exc.Abort:
|
except exc.Abort:
|
||||||
raise exc.Abort
|
raise exc.Abort
|
||||||
finally:
|
|
||||||
await exe.delete()
|
await exe.delete()
|
||||||
try:
|
try:
|
||||||
sys.stdout = io.StringIO()
|
sys.stdout = io.StringIO()
|
||||||
|
|
Loading…
Reference in a new issue