mirror of
https://github.com/myned/modufur.git
synced 2024-12-24 14:27:27 +00:00
Merge branch 'dev'
This commit is contained in:
commit
661194ea5d
1 changed files with 13 additions and 7 deletions
20
src/run.py
20
src/run.py
|
@ -74,8 +74,10 @@ async def on_ready():
|
|||
|
||||
from cogs import booru, info, management, owner, tools
|
||||
|
||||
cogs = {}
|
||||
for cog in (tools.Utils(bot), owner.Bot(bot), owner.Tools(bot), management.Administration(bot), info.Info(bot), booru.MsG(bot)):
|
||||
bot.add_cog(cog)
|
||||
cogs[type(cog).__name__] = cog
|
||||
print(f'COG : {type(cog).__name__}')
|
||||
|
||||
# bot.loop.create_task(u.clear(booru.temp_urls, 30*60))
|
||||
|
@ -104,14 +106,18 @@ async def on_ready():
|
|||
else:
|
||||
print('\n- - - -\nI N F O : reconnected, reinitializing\n- - - -')
|
||||
|
||||
from cogs import booru, info, management, owner, tools
|
||||
|
||||
for cog in (tools.Utils(bot), owner.Bot(bot), owner.Tools(bot), management.Administration(bot), info.Info(bot), booru.MsG(bot)):
|
||||
bot.add_cog(cog)
|
||||
print(f'COG : {type(cog).__name__}')
|
||||
if u.tasks['auto_del']:
|
||||
for channel in u.tasks['auto_del']:
|
||||
temp = bot.get_channel(channel)
|
||||
bot.loop.create_task(cogs['Administration'].queue_for_deletion(temp))
|
||||
print('RESTARTED : auto-deleting in #{}'.format(temp.name))
|
||||
cogs['Administration'].deleting = True
|
||||
bot.loop.create_task(cogs['Administration'].delete())
|
||||
|
||||
if u.config['playing'] is not '':
|
||||
await bot.change_presence(game=d.Game(name=u.config['playing']))
|
||||
# if u.config['playing'] is not '':
|
||||
# await bot.change_presence(game=d.Game(name=u.config['playing']))
|
||||
|
||||
print('\nS U C C E S S\n')
|
||||
|
||||
|
||||
@bot.event
|
||||
|
|
Loading…
Reference in a new issue