use logging in bot startup
This commit is contained in:
parent
c2da9d09a3
commit
a226cfd020
|
@ -1,5 +1,6 @@
|
|||
"""Start the Discord bot and connect to Discord."""
|
||||
import asyncio
|
||||
import logging
|
||||
|
||||
from django.conf import settings
|
||||
from django.core.management.base import BaseCommand
|
||||
|
@ -7,11 +8,13 @@ from django.core.management.base import BaseCommand
|
|||
from bot import hitomi
|
||||
from bot.api import hitomi_api
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@hitomi.event
|
||||
async def on_ready():
|
||||
"""Print some basic login info to the console, when the bot connects."""
|
||||
print("Logged in as {0:s} ({1:s})".format(hitomi.user.name, hitomi.user.id))
|
||||
logger.info("Logged in as {0:s} ({1:s})".format(hitomi.user.name, hitomi.user.id))
|
||||
|
||||
|
||||
async def run_bot():
|
||||
|
|
Loading…
Reference in New Issue