mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-12-27 23:47:02 +01:00
Added commands I think
This commit is contained in:
parent
13b2aade5e
commit
af41365c7b
@ -13,9 +13,9 @@ logging.getLogger('sqlalchemy')
|
|||||||
bot = commands.Bot(command_prefix=config['command-prefix'])
|
bot = commands.Bot(command_prefix=config['command-prefix'])
|
||||||
database = DatabaseInterface(bot)
|
database = DatabaseInterface(bot)
|
||||||
|
|
||||||
def _cleanup(self):
|
def _cleanup():
|
||||||
try:
|
try:
|
||||||
bot.loop.run_until_complete(self.logout())
|
bot.loop.run_until_complete(logout())
|
||||||
except: # Can be ignored
|
except: # Can be ignored
|
||||||
pass
|
pass
|
||||||
pending = asyncio.Task.all_tasks()
|
pending = asyncio.Task.all_tasks()
|
||||||
@ -194,7 +194,7 @@ except discord.errors.LoginFailure:
|
|||||||
print("Invalid bot token in config!")
|
print("Invalid bot token in config!")
|
||||||
finally:
|
finally:
|
||||||
try:
|
try:
|
||||||
self._cleanup()
|
_cleanup()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print("Error in cleanup:", e)
|
print("Error in cleanup:", e)
|
||||||
bot.loop.close()
|
bot.loop.close()
|
Loading…
Reference in New Issue
Block a user