Garde-Havoc/bot/bot.py

33 lines
663 B
Python
Raw Permalink Normal View History

2024-07-24 14:46:46 +02:00
import discord
from discord.ext import commands
from cogs.minecraft import Minecraft
from cogs.user_management import UserManager
2024-10-09 18:29:51 +02:00
from cogs.spawner import Spawner
2024-07-24 14:46:46 +02:00
# Setup Environment
import os
from dotenv import load_dotenv
load_dotenv()
# Discord Stuff
TOKEN = os.environ['TOKEN']
# Setup Basic Permission
intents = discord.Intents.default()
intents.message_content = True
# Define the actual Bot
bot = commands.Bot(command_prefix='-', intents=intents)
async def setup():
2024-10-09 18:29:51 +02:00
await bot.add_cog(Minecraft(bot))
2024-07-24 14:46:46 +02:00
await bot.add_cog(UserManager(bot))
2024-10-09 18:29:51 +02:00
await bot.add_cog(Spawner(bot))
2024-07-24 14:46:46 +02:00
@bot.event
async def on_ready():
await setup()
bot.run(TOKEN)