2024-11-30 11:27:32 +00:00
|
|
|
import logging
|
2024-12-02 12:58:16 +00:00
|
|
|
import os
|
2024-11-30 11:27:32 +00:00
|
|
|
|
|
|
|
from dotenv import load_dotenv
|
|
|
|
from interactions import Client, Intents
|
|
|
|
|
|
|
|
|
|
|
|
class TokenBot:
|
|
|
|
def __init__(self):
|
|
|
|
load_dotenv()
|
|
|
|
print("#### WoW Token Bot Startup ####")
|
2024-11-30 12:43:35 +00:00
|
|
|
logging.basicConfig(
|
|
|
|
format='%(asctime)s.%(msecs)03d %(levelname)s %(module)s - %(funcName)s: %(message)s',
|
|
|
|
datefmt='%Y-%m-%d %H:%M:%S',
|
|
|
|
)
|
2024-11-30 11:27:32 +00:00
|
|
|
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"))
|