From dd3b9053b19b525f484c2b2a045d1706875cfa28 Mon Sep 17 00:00:00 2001 From: Florian SYLVAIN Date: Sun, 7 Mar 2021 19:55:41 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=8A=20-=20Improved=20console=20debug?= =?UTF-8?q?=20at=20startup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- python/main.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/python/main.py b/python/main.py index 2629a5d..2767dc4 100644 --- a/python/main.py +++ b/python/main.py @@ -1,15 +1,19 @@ from private import TOKEN_BOT +from time import time from discord.ext import commands import discord bot = commands.Bot(command_prefix='$') startup_extensions = ["cmd_other", "cmd_lol", "cmd_osu", "cmd_twitch"] +time_s = time() +print('Loading started') @bot.event async def on_ready(): default_activity = discord.Activity(type=discord.ActivityType.listening, name='$help') await bot.change_presence(activity=default_activity) - print('We have logged in as ' + bot.user.name + '.') + print('Logged in as ' + str(bot.user) + + ' in ' + str(round(time() - time_s, 2)) + 's.') @bot.command(hidden=True) @@ -43,4 +47,5 @@ async def unloadext(ctx, extension): if __name__ == "__main__": for extension in startup_extensions: bot.load_extension(extension) + print('Extension "' + str(extension) + '" loaded.') bot.run(TOKEN_BOT)