Files
background.js
bot.py
content.css
content.js
manifest.json
popup.css
popup.html
popup.js
requirements.txt
Code
9 444
bot.py
import logging
import os
import discord
from discord.ext import commands
from dotenv import load_dotenv
load_dotenv()
logging.basicConfig(level=logging.INFO)
bot = commands.Bot(command_prefix="!", intents=discord.Intents.default())
@bot.event
async def on_ready():
logging.info("Logged in as %s", bot.user)
print("KODARI_READY", flush=True)
if __name__ == "__main__":
token = os.getenv("DISCORD_TOKEN")
if not token or token == "your_discord_bot_token_here":
raise SystemExit("Set DISCORD_TOKEN in .env to your Discord bot token.")
bot.run(token)