Helium is a modular, feature-rich Discord bot written in Python using the Pycord library. It utilizes a plugin system to provide a wide range of functionalities including AI chat, image generation, moderation, leveling, and social roleplay features.
The project is organized into a core runner and a plugin directory:
- helium.py: The main entry point. It initializes the
BridgeBot, loads plugins, and handles startup. - bot_events.py: Handles global Discord events like
on_ready,on_message, and error handling. - bot_plugins/: Contains the modular cogs (extensions) that add functionality to the bot.
- Plugins are dynamically loaded via bot_plugins/__init__.py.
- classes.py: Custom helper classes, context wrappers, and exceptions.
- log_formatter.py: Configuration for the
helium_logger.
Helium is built with discord.ext.bridge, supporting both Slash Commands and traditional prefix commands (. or h.).
- Chatbot: Integrated AI chat capabilities using Groq or OpenAI (bot_plugins/bot_chatbot.py).
- Image Generation: Generate images and variations using DALL-E via OpenAI (bot_plugins/bot_image_generator.py).
- Translation: Translate text using Google Translate (bot_plugins/bot_translate.py).
- Moderation: Commands to ban, mute, kick, and purge messages (bot_plugins/bot_moderation.py).
- Admin Tools: Server listing and management tools (bot_plugins/bot_admin.py).
- XP System: Tracks user activity and awards XP (bot_plugins/bot_levels.py).
- Rank Cards: Generates visual rank cards with custom Minecraft-themed icons (bot_plugins/bot_ranks.py).
- Relations: Marriage and adoption systems allowing users to "marry" or "adopt" others (bot_plugins/bot_relations.py).
- Reactions: Roleplay commands (hug, kiss, slap, etc.) defined in bot_plugins/bot_reactions_data.py.
- Random: Dice rolling, choice making, and fighting simulations (bot_plugins/bot_random.py).
- Polls: Create reaction-based choices/polls (bot_plugins/bot_choice.py).
-
Clone the repository:
git clone <repository-url> cd Helium
-
Install Dependencies: Ensure you have Python installed, then run:
pip install -r requirements.txt
Note: Key dependencies include
py-cord,Pillow,aiohttp, andgoogletrans. -
Configuration: The bot expects a
token_secret.pyfile in the root directory (based onhelium.py). Create this file and add your credentials:# token_secret.py helium = "YOUR_DISCORD_BOT_TOKEN" will_i_am_id = 123456789012345678 # Your Admin User ID CHAT_GPT_API_KEY = "YOUR_OPENAI_KEY" # If using OpenAI features
-
Run the Bot:
python helium.py
- Bot Prefix: Defaults to
.orh.(configured in helium.py). - AI Provider: You can switch between Groq and OpenAI in bot_plugins/bot_chatbot.py.