wow-token-app-bot/token_bot/token_bot.py
Emily Doherty 34badf17eb Once and for all reformat.
Will be using black code formatter
2024-12-08 17:07:26 -08:00

24 lines
732 B
Python

import logging
import os
from dotenv import load_dotenv
from interactions import Client, Intents
class TokenBot:
def __init__(self):
load_dotenv()
print("#### WoW Token Bot Startup ####")
logging.basicConfig(
format="%(asctime)s.%(msecs)03d %(levelname)s %(module)s - %(funcName)s: %(message)s",
datefmt="%Y-%m-%d %H:%M:%S",
)
log = logging.getLogger("TokenBotLogger")
log.setLevel(logging.INFO)
self.bot = Client(intents=Intents.DEFAULT, asyncio_debug=True, logger=log)
def run(self):
self.bot.load_extension("token_bot.core")
self.bot.load_extension("token_bot.tracker")
self.bot.start(os.getenv("DISCORD_TOKEN"))