This guide will help you set up your first Elyth bot.
pip install elyth
(Ensure Python 3.8+ is installed).
SERVER MEMBERS INTENT, MESSAGE CONTENT INTENT, and GUILDS intents.from elyth import ElythBot
import os
TOKEN = os.getenv("DISCORD_BOT_TOKEN")
if not TOKEN:
print("Error: DISCORD_BOT_TOKEN environment variable not set!")
exit()
bot = ElythBot(token=TOKEN, prefix="!")
@bot.event("on_ready", "PRINT: My bot is online!")
@bot.command("test", "REPLY: It works, {user.mention}!")
bot.run()
python your_bot_file.pyFor more details on commands and variables, see Common Action Verbs and Available Variables.