mirror of
https://github.com/myned/modufur.git
synced 2024-11-01 21:02:38 +00:00
Changed "restart_(ch to chan)" to "startup_" for clarity with shutdown
This commit is contained in:
parent
ba10b668a7
commit
801ee2be71
2 changed files with 8 additions and 8 deletions
|
@ -30,8 +30,8 @@ class Bot:
|
|||
|
||||
await self.bot.get_channel(u.config['info_channel']).send('**Shutting down** 🌙 . . .')
|
||||
|
||||
u.temp['restart_ch'] = ctx.channel.id
|
||||
u.temp['restart_msg'] = ctx.message.id
|
||||
u.temp['startup_chan'] = ctx.channel.id
|
||||
u.temp['startup_msg'] = ctx.message.id
|
||||
u.dump(u.temp, 'temp.pkl')
|
||||
|
||||
# loop = self.bot.loop.all_tasks()
|
||||
|
@ -52,8 +52,8 @@ class Bot:
|
|||
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_msg'] = ctx.message.id
|
||||
u.temp['startup_chan'] = ctx.channel.id
|
||||
u.temp['startup_msg'] = ctx.message.id
|
||||
u.dump(u.temp, 'temp.pkl')
|
||||
|
||||
# loop = self.bot.loop.all_tasks()
|
||||
|
|
|
@ -51,8 +51,8 @@ async def on_ready():
|
|||
await bot.get_channel(u.config['info_channel']).send('**Started** ☀️ .')
|
||||
# u.notify('C O N N E C T E D')
|
||||
if u.temp:
|
||||
channel = bot.get_channel(u.temp['restart_ch'])
|
||||
message = await channel.get_message(u.temp['restart_msg'])
|
||||
channel = bot.get_channel(u.temp['startup_chan'])
|
||||
message = await channel.get_message(u.temp['startup_msg'])
|
||||
await message.add_reaction('✅')
|
||||
u.temp.clear()
|
||||
|
||||
|
@ -70,8 +70,8 @@ async def on_error(error, *args, **kwargs):
|
|||
await bot.get_user(u.config['owner_id']).send('**ERROR** ⚠\n```\n{}```'.format(error))
|
||||
await bot.get_channel(u.config['info_channel']).send('**ERROR** ⚠\n```\n{}```'.format(error))
|
||||
if u.temp:
|
||||
channel = bot.get_channel(u.temp['restart_ch'])
|
||||
message = await channel.get_message(u.temp['restart_msg'])
|
||||
channel = bot.get_channel(u.temp['startup_chan'])
|
||||
message = await channel.get_message(u.temp['startup_msg'])
|
||||
await message.add_reaction('⚠')
|
||||
u.temp.clear()
|
||||
# u.notify('E R R O R')
|
||||
|
|
Loading…
Reference in a new issue