19 lines
534 B
Python
19 lines
534 B
Python
"""Start the Discord bot and connect to Discord."""
|
|
from django.conf import settings
|
|
from django.core.management.base import BaseCommand
|
|
|
|
from bot import hitomi
|
|
|
|
|
|
@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))
|
|
|
|
|
|
class Command(BaseCommand):
|
|
help = "Start the Discord bot and connect to Discord."
|
|
|
|
def handle(self, *args, **options):
|
|
hitomi.run(settings.DISCORD_BOT_TOKEN)
|