Files
staceybot-template/main.py
2024-06-05 19:05:10 +02:00

26 lines
504 B
Python

import discord
import os
from dotenv import load_dotenv
load_dotenv()
intents = discord.Intents.default()
intents.message_content = True
intents.members = True
bot = discord.Bot(intents=intents)
@bot.event
async def on_ready():
print(f"The Bot {bot.user} has been started successfully")
if __name__ == "__main__":
for filename in os.listdir("cogs"):
if filename.endswith(".py"):
bot.load_extension(f"cogs.{filename[:-3]}")
bot.run(os.getenv("discord_bot_token"))