inital commit
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
import os
|
||||
import asyncio
|
||||
import discord
|
||||
from bot import TaskBot
|
||||
from database import Database
|
||||
from dotenv import load_dotenv
|
||||
|
||||
async def main():
|
||||
load_dotenv()
|
||||
discord.utils.setup_logging()
|
||||
|
||||
token = os.getenv("DISCORD_TOKEN")
|
||||
if not token:
|
||||
print("Error: DISCORD_TOKEN not found in environment variables.")
|
||||
return
|
||||
|
||||
db = Database()
|
||||
bot = TaskBot(db)
|
||||
|
||||
async with bot:
|
||||
await bot.start(token)
|
||||
|
||||
if __name__ == "__main__":
|
||||
try:
|
||||
asyncio.run(main())
|
||||
except KeyboardInterrupt:
|
||||
pass
|
||||
Reference in New Issue
Block a user