@arish_scholar/fenrir
v2.0.0
Published
Fenrir - A full-featured Discord bot using Components v2
Maintainers
Readme
Fenrir
A full-featured Discord bot built with Components v2 and MongoDB, designed for community engagement, productivity, and study workflows.
Table of Contents
Features
- Suggestion System — Submit, vote, moderate, and auto-log suggestions with Components v2 cards
- Feedback System — Star-rated community reviews with dedicated channels
- Pomodoro Timer — Voice-gated study timers with pause/resume, group sessions, task tracking, and reward roles
- AI Chat — Auto-reply AI in configured channels using Groq with conversation memory
- No Prefix — Global no-prefix system with expiry, boost rewards, and role management
- Interactive UI — All messages use Discord Components v2 (Containers, Sections, Text Displays, Separators, Buttons)
- MongoDB Storage — All guild and global data persisted in MongoDB Atlas
- Prefix + Slash — Every command supports both
/slashand.prefixexecution
Commands
All commands support both slash (/command) and prefix (.command) syntax.
Utility
| Command | Description |
|---------|-------------|
| /help | Browse all commands by category with an interactive menu |
| /calculator | Open an interactive button-based calculator |
| /pomodoro | Start, stop, pause, extend, or check your Pomodoro study timer |
| /tasks | Add, list, complete, remove, or clear your study task list |
| /guildprofile | Customize the bot's profile for this server (avatar, nickname, bio) |
Community
| Command | Description |
|---------|-------------|
| /suggest | Submit a suggestion to the configured channel |
| /feedback | Submit a star-rated review to the feedback channel |
| /say | Send a message as the bot to a specific channel (server owner only) |
Moderation
| Command | Description |
|---------|-------------|
| /moderate | Approve, deny, or mark a suggestion as under consideration |
| /purge | Bulk delete messages from a channel with optional user filter |
| /steal | Shortcut for /emoji steal — steal an emoji or sticker from a message |
Emoji Management
| Command | Description |
|---------|-------------|
| /emoji list | List all server emojis with pagination (.emoji list) |
| /emoji info <emoji> | Get details about an emoji (ID, type, creation date) |
| /emoji add <emoji_or_url> [name] | Add an emoji from a custom emoji or image URL |
| /emoji remove <name_or_id> | Remove a server emoji (with confirmation) |
| /emoji rename <emoji> <name> | Rename a server emoji |
| /emoji enlarge <emoji> | Show a large version of an emoji with a direct link |
| /emoji steal [emoji] [message_id] | Steal emojis/stickers/attachments from a message |
Admin
| Command | Permission | Description |
|---------|------------|-------------|
| /setsuggestions | Manage Server | Set the channel for suggestions (auto-applies 5h slowmode) |
| /removesuggestions | Manage Server | Remove the configured suggestion channel |
| /setfeedback | Manage Server | Set the channel for feedback reviews |
| /removefeedback | Manage Server | Remove the configured feedback channel |
| /setlogs | Manage Server | Set the channel for high-vote suggestion logs |
| /votethreshold | Manage Server | Set how many upvotes trigger a log entry |
| /threadconfig | Manage Server | Configure slowmode for suggestion discussion threads |
| /setstudyvc | Manage Server | Set the required voice channel for Pomodoro sessions |
| /setpomodororeward | Manage Server | Add or remove reward roles for completed Pomodoro sessions |
| /ytverify setup | Manage Server | Set the YouTube channel (validated via API) |
| /ytverify channel | Manage Server | Set the verification channel |
| /ytverify role | Manage Server | Set the role to assign on verification |
| /ytverify toggle | Manage Server | Enable or disable verification |
| /ytverify reset | Manage Server | Reset all verification settings |
| /ytverify config | Manage Server | Show current configuration |
| /ytverify test | Manage Server | Test the verification setup |
| /ytverify verify | Everyone | Start the verification process |
| /np | Bot Dev | Manage the global no-prefix user list |
| /npconfig | Bot Dev | Configure no-prefix reward guilds and log channels |
| /servers | Bot Dev | List, leave, or get invite links for connected servers |
AI / System
| Command | Description |
|---------|-------------|
| /setchannel | Set the AI auto-reply channel (admin only) |
| /ping | Check gateway latency, REST latency, and uptime |
| /stats | View bot statistics, server count, and system info |
| /clear | Clear your personal AI conversation history |
Pterodactyl
| Command | Permission | Description |
|---------|-----------|-------------|
| /ptero setup | Server Owner | Configure panel URL, API key, and server creator role |
| /ptero config | Everyone | Show current panel configuration |
| /ptero panel | Everyone | Check panel status and node health |
| /ptero nodes | Manage Server | List all nodes with resource info |
| /ptero eggs | Manage Server | List available eggs |
| /ptero server create | Creator Role | Create a server (requires node + egg selection) |
| /ptero server list | Everyone | List servers by user email |
| /ptero server info | Everyone | Show detailed server information |
| /ptero server delete | Manage Server | Delete a server |
| /ptero server start/stop/restart | Everyone | Power actions on a server |
Setup
Prerequisites
- Node.js 18 or higher (below 22)
- MongoDB Atlas cluster (or self-hosted MongoDB)
- Discord Bot application with a bot token
Installation
# Clone the repository
git clone <your-repo-url> fenrir
cd fenrir
# Install dependencies
npm install
# Create your environment file
cp .env.example .envEdit .env with your values, then start the bot:
npm startEnvironment Variables
| Variable | Required | Description |
|----------|----------|-------------|
| TOKEN | Yes | Your Discord bot token |
| CLIENT_ID | Yes | Your Discord application/client ID |
| MONGODB_URI | Yes | MongoDB connection string |
| EMOJI_GUILD_ID | No | Server ID for hosting custom emojis |
| GROQ_API_KEY_1 | No | Groq API key for AI chat features |
| YOUTUBE_API_KEY | No | YouTube Data API v3 key for verification |
Example .env:
TOKEN=your_bot_token_here
CLIENT_ID=your_client_id_here
MONGODB_URI=mongodb+srv://user:[email protected]/fenrir
EMOJI_GUILD_ID=123456789
GROQ_API_KEY_1=gsk_your_key_here
YOUTUBE_API_KEY=AIza_your_key_hereBot Permissions
When inviting the bot, ensure it has these permissions:
Send MessagesRead Message HistoryManage Messages(for prefix command cleanup)Create Public ThreadsSend Messages in ThreadsEmbed LinksUse Application CommandsManage Roles(for Pomodoro rewards)
How It Works
Suggestions
- An admin runs
/setsuggestions #channelto configure the suggestion channel - Users submit suggestions via
/suggest textor by posting directly in the channel - Each suggestion appears as a Components v2 card with upvote/downvote buttons
- A discussion thread is automatically created under each suggestion
- When upvotes cross the threshold (
/votethreshold), the suggestion is forwarded to the logs channel - Moderators can
/moderatesuggestions to approve, deny, or mark as considered 5-hour slowmode is applied automatically to prevent spam.
Feedback
- An admin runs
/setfeedback #channelto configure the feedback channel - A prompt card with a "Submit Your Review" button is posted
- Users submit reviews via
/feedback rating textwith a 1-5 star rating - Reviews appear as styled cards with star ratings and author info
Pomodoro Timer
- An admin runs
/setstudyvcto require a specific voice channel - Users start timers with
/pomodoro start 25while in the study VC - Leaving the VC automatically stops the timer
- Supports pause/resume, +5 min extension, group invites, and task assignment
- Reward roles are granted after configurable session thresholds (
/setpomodororeward)
AI Chat
- An admin runs
/setchannel #ai-channelto configure the AI channel - Messages in that channel get AI responses via Groq (Llama 3.1 / Mixtral)
- Conversation history is maintained per-user (last 4 messages)
- Users can clear their history with
/clear - 5-second cooldown between messages per user
YouTube Verification
- An admin configures with
/ytverify setup <url>(validates channel via YouTube Data API v3) - Admin sets verification channel (
/ytverify channel #verify) and reward role (/ytverify role @role) - Admin enables with
/ytverify toggle - Users run
/ytverify verifyto get a unique 6-character code - Users add the code to their YouTube channel About → Description
- Users click Verify Now, paste their YouTube URL
- Bot fetches the channel via YouTube API, checks if the description contains the code
- If code matches → role is assigned. Code expires after 5 minutes.
Pterodactyl Panel
- Server owner runs
/ptero setup <panel_url> <api_key> @creator_roleto configure - Panel API key is stored per-guild in MongoDB (each server can have its own panel)
- Members with the creator role can create servers via
/ptero server create - Server creation requires selecting a node and egg, plus specifying RAM/CPU/disk
- Admins can list nodes, eggs, view all servers, delete, and manage power states
- Normal users cannot create servers — only members with the configured creator role
No Prefix System
- Bot developers can grant users global no-prefix access via
/np - Supports timed access (10 minutes to lifetime)
- Auto-rewards boosters of partner servers with 60-day no-prefix
- Expiry is checked every 10 minutes; expired users are automatically removed and notified
Project Structure
fenrir/
index.js # Entry point — loads events, connects MongoDB, starts bot
package.json
.env # Environment variables (not committed)
.env.example # Template for environment variables
LICENSE # Proprietary license
README.md
commands/ # Slash + prefix command handlers
calculator.js
clear.js
emoji.js
feedback.js
guildprofile.js
help.js
moderate.js
noprefix.js
npconfig.js
ping.js
pomodoro.js
purge.js
removefeedback.js
removesuggestions.js
say.js
servers.js
setchannel.js
setfeedback.js
setlogs.js
setpomodororeward.js
setstudyvc.js
setsuggestions.js
stats.js
steal.js
suggest.js
tasks.js
threadconfig.js
votethreshold.js
ytverify.js
events/ # Discord event handlers
guildMemberUpdate.js # Boost-based no-prefix grants/removals
interactionCreate.js # Slash commands, buttons, select menus
messageCreate.js # Auto-suggest, AI auto-reply, prefix commands
ready.js # Startup: register commands, restore timers
voiceStateUpdate.js # Stop Pomodoro when leaving study VC
utils/ # Shared utilities
ai.js # Groq AI chat with conversation memory
calculator.js # Calculator session state
commandLogic.js # Suggestion/vote/feedback core logic
components.js # All Components v2 builders
constants.js # Prefix and color constants
db.js # MongoDB read/write interface
emojis.js # Custom emoji resolution with fallbacks
loading.js # Command loading card builders
mongodb.js # Mongoose schemas and connection
noprefixLogic.js # No-prefix grant/revoke/expiry logic
pomodoro.js # Pomodoro timer, tasks, rewardsCredits
Fenrir was created and developed entirely by arish_scholar.
All design, architecture, and implementation credit goes to arish_scholar.
License
This project is proprietary and closed-source.
Copyright (c) 2024-2026 arish_scholar. All rights reserved.
You may not sell, share, modify, or distribute this software or its source code in any form. Unauthorized use will result in legal action.
See LICENSE for full details.
