Changed everything, gonna clean up later.
This commit is contained in:
@@ -1,7 +1,25 @@
|
||||
from discord.ext import commands
|
||||
import discord
|
||||
import threading
|
||||
import os
|
||||
from dotenv import load_dotenv
|
||||
|
||||
_started = False
|
||||
|
||||
intents = discord.Intents.default()
|
||||
bot = commands.Bot(command_prefix="!", intents=intents)
|
||||
|
||||
bot.tracked_games = []
|
||||
bot.tracked_games_lock = threading.Lock()
|
||||
|
||||
|
||||
async def start_bot():
|
||||
global _started
|
||||
if _started:
|
||||
return
|
||||
_started = True
|
||||
load_dotenv()
|
||||
TOKEN = os.getenv("TOKEN")
|
||||
if not TOKEN:
|
||||
raise ValueError("No token found")
|
||||
await bot.start(TOKEN)
|
||||
|
||||
Reference in New Issue
Block a user