33 lines
663 B
Python
33 lines
663 B
Python
import discord
|
|
from discord.ext import commands
|
|
|
|
from cogs.minecraft import Minecraft
|
|
from cogs.user_management import UserManager
|
|
from cogs.spawner import Spawner
|
|
|
|
# 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():
|
|
await bot.add_cog(Minecraft(bot))
|
|
await bot.add_cog(UserManager(bot))
|
|
await bot.add_cog(Spawner(bot))
|
|
|
|
@bot.event
|
|
async def on_ready():
|
|
await setup()
|
|
|
|
bot.run(TOKEN)
|