AI-Discord-Bot/bot.py

23 lines
431 B
Python
Raw Normal View History

2025-05-06 11:56:01 -04:00
import os
import discord
2025-05-06 11:56:01 -04:00
from discord.ext import commands
from dotenv import load_dotenv
2025-05-06 11:56:01 -04:00
load_dotenv()
TOKEN = os.getenv("DISCORD_TOKEN")
2025-05-06 11:56:01 -04:00
intents = discord.Intents.default()
intents.message_content = True
2025-05-06 11:56:01 -04:00
bot = commands.Bot(command_prefix="!", intents=intents)
2025-05-06 11:56:01 -04:00
@bot.event
async def on_ready():
print(f"✅ Logged in as {bot.user.name}")
2025-05-06 11:56:01 -04:00
@bot.command()
async def ping(ctx):
await ctx.send("🏓 Pong!")
2025-05-06 11:56:01 -04:00
bot.run(TOKEN)