{"_id":"@arish_scholar/fenrir","name":"@arish_scholar/fenrir","dist-tags":{"latest":"2.0.0"},"versions":{"2.0.0":{"name":"@arish_scholar/fenrir","version":"2.0.0","description":"Fenrir - A full-featured Discord bot using Components v2","main":"index.js","type":"module","scripts":{"start":"node index.js"},"bin":{"fenrir":"index.js"},"keywords":["discord","discord-bot","bot","pomodoro","suggestions","ai-chat","moderation","components-v2"],"author":{"name":"arish_scholar"},"license":"SEE LICENSE IN LICENSE","repository":{"type":"git","url":"git+https://github.com/arish-devz/fenrir.git"},"bugs":{"url":"https://github.com/arish-devz/fenrir/issues"},"homepage":"https://github.com/arish-devz/fenrir#readme","publishConfig":{"access":"public"},"dependencies":{"@napi-rs/canvas":"^0.1.97","axios":"^1.6.7","discord.js":"^14.18.0","dotenv":"^16.4.5","mongoose":"^9.3.3","tesseract.js":"^7.0.0"},"engines":{"node":">=18.0.0 <22.0.0"},"_id":"@arish_scholar/fenrir@2.0.0","gitHead":"d0c1f4f0fcf6d9bf71bd4dcfa809cdc479a95784","_nodeVersion":"20.19.6","_npmVersion":"10.8.2","dist":{"integrity":"sha512-KnTi8Gklf/EhxAlZLe1lQa/qQEGGkGrZWOs//ofBKc4s9oe+pecXqsifbQyYVfujqO/Ho0eaVaxgSESIPtuWQw==","shasum":"5268953f3c7a6914a2dbed46de7c0961b64d66a2","tarball":"https://registry.npmjs.org/@arish_scholar/fenrir/-/fenrir-2.0.0.tgz","fileCount":72,"unpackedSize":640889,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCID7mN/FqaIeKEGJy4fAlftzWJJ7fakMLu+lE6C46q7KdAiA+dxCOamQKxL0YH+X/ZkDcA46C7xV15gjrJhEttm3b0g=="}]},"_npmUser":{"name":"arish_scholar","email":"arelixdevelopment@gmail.com"},"directories":{},"maintainers":[{"name":"arish_scholar","email":"arelixdevelopment@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/fenrir_2.0.0_1775208383635_0.5220503401714924"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-03T09:26:23.513Z","2.0.0":"2026-04-03T09:26:23.809Z","modified":"2026-04-03T09:26:24.014Z"},"maintainers":[{"name":"arish_scholar","email":"arelixdevelopment@gmail.com"}],"description":"Fenrir - A full-featured Discord bot using Components v2","homepage":"https://github.com/arish-devz/fenrir#readme","keywords":["discord","discord-bot","bot","pomodoro","suggestions","ai-chat","moderation","components-v2"],"repository":{"type":"git","url":"git+https://github.com/arish-devz/fenrir.git"},"author":{"name":"arish_scholar"},"bugs":{"url":"https://github.com/arish-devz/fenrir/issues"},"license":"SEE LICENSE IN LICENSE","readme":"# Fenrir\n\nA full-featured Discord bot built with **Components v2** and **MongoDB**, designed for community engagement, productivity, and study workflows.\n\n---\n\n## Table of Contents\n\n- [Features](#features)\n- [Commands](#commands)\n  - [Utility](#utility)\n  - [Community](#community)\n  - [Moderation](#moderation)\n  - [Admin](#admin)\n  - [AI / System](#ai--system)\n- [Setup](#setup)\n  - [Prerequisites](#prerequisites)\n  - [Installation](#installation)\n  - [Environment Variables](#environment-variables)\n  - [Bot Permissions](#bot-permissions)\n- [How It Works](#how-it-works)\n  - [Suggestions](#suggestions)\n  - [Feedback](#feedback)\n  - [Pomodoro Timer](#pomodoro-timer)\n  - [AI Chat](#ai-chat)\n  - [No Prefix System](#no-prefix-system)\n- [Project Structure](#project-structure)\n- [Credits](#credits)\n- [License](#license)\n\n---\n\n## Features\n\n- **Suggestion System** — Submit, vote, moderate, and auto-log suggestions with Components v2 cards\n- **Feedback System** — Star-rated community reviews with dedicated channels\n- **Pomodoro Timer** — Voice-gated study timers with pause/resume, group sessions, task tracking, and reward roles\n- **AI Chat** — Auto-reply AI in configured channels using Groq with conversation memory\n- **No Prefix** — Global no-prefix system with expiry, boost rewards, and role management\n- **Interactive UI** — All messages use Discord Components v2 (Containers, Sections, Text Displays, Separators, Buttons)\n- **MongoDB Storage** — All guild and global data persisted in MongoDB Atlas\n- **Prefix + Slash** — Every command supports both `/slash` and `.prefix` execution\n\n---\n\n## Commands\n\nAll commands support both slash (`/command`) and prefix (`.command`) syntax.\n\n### Utility\n\n| Command | Description |\n|---------|-------------|\n| `/help` | Browse all commands by category with an interactive menu |\n| `/calculator` | Open an interactive button-based calculator |\n| `/pomodoro` | Start, stop, pause, extend, or check your Pomodoro study timer |\n| `/tasks` | Add, list, complete, remove, or clear your study task list |\n| `/guildprofile` | Customize the bot's profile for this server (avatar, nickname, bio) |\n\n### Community\n\n| Command | Description |\n|---------|-------------|\n| `/suggest` | Submit a suggestion to the configured channel |\n| `/feedback` | Submit a star-rated review to the feedback channel |\n| `/say` | Send a message as the bot to a specific channel (server owner only) |\n\n### Moderation\n\n| Command | Description |\n|---------|-------------|\n| `/moderate` | Approve, deny, or mark a suggestion as under consideration |\n| `/purge` | Bulk delete messages from a channel with optional user filter |\n| `/steal` | Shortcut for `/emoji steal` — steal an emoji or sticker from a message |\n\n### Emoji Management\n\n| Command | Description |\n|---------|-------------|\n| `/emoji list` | List all server emojis with pagination (`.emoji list`) |\n| `/emoji info <emoji>` | Get details about an emoji (ID, type, creation date) |\n| `/emoji add <emoji_or_url> [name]` | Add an emoji from a custom emoji or image URL |\n| `/emoji remove <name_or_id>` | Remove a server emoji (with confirmation) |\n| `/emoji rename <emoji> <name>` | Rename a server emoji |\n| `/emoji enlarge <emoji>` | Show a large version of an emoji with a direct link |\n| `/emoji steal [emoji] [message_id]` | Steal emojis/stickers/attachments from a message |\n\n### Admin\n\n| Command | Permission | Description |\n|---------|------------|-------------|\n| `/setsuggestions` | Manage Server | Set the channel for suggestions (auto-applies 5h slowmode) |\n| `/removesuggestions` | Manage Server | Remove the configured suggestion channel |\n| `/setfeedback` | Manage Server | Set the channel for feedback reviews |\n| `/removefeedback` | Manage Server | Remove the configured feedback channel |\n| `/setlogs` | Manage Server | Set the channel for high-vote suggestion logs |\n| `/votethreshold` | Manage Server | Set how many upvotes trigger a log entry |\n| `/threadconfig` | Manage Server | Configure slowmode for suggestion discussion threads |\n| `/setstudyvc` | Manage Server | Set the required voice channel for Pomodoro sessions |\n| `/setpomodororeward` | Manage Server | Add or remove reward roles for completed Pomodoro sessions |\n| `/ytverify setup` | Manage Server | Set the YouTube channel (validated via API) |\n| `/ytverify channel` | Manage Server | Set the verification channel |\n| `/ytverify role` | Manage Server | Set the role to assign on verification |\n| `/ytverify toggle` | Manage Server | Enable or disable verification |\n| `/ytverify reset` | Manage Server | Reset all verification settings |\n| `/ytverify config` | Manage Server | Show current configuration |\n| `/ytverify test` | Manage Server | Test the verification setup |\n| `/ytverify verify` | Everyone | Start the verification process |\n| `/np` | Bot Dev | Manage the global no-prefix user list |\n| `/npconfig` | Bot Dev | Configure no-prefix reward guilds and log channels |\n| `/servers` | Bot Dev | List, leave, or get invite links for connected servers |\n\n### AI / System\n\n| Command | Description |\n|---------|-------------|\n| `/setchannel` | Set the AI auto-reply channel (admin only) |\n| `/ping` | Check gateway latency, REST latency, and uptime |\n| `/stats` | View bot statistics, server count, and system info |\n| `/clear` | Clear your personal AI conversation history |\n\n### Pterodactyl\n\n| Command | Permission | Description |\n|---------|-----------|-------------|\n| `/ptero setup` | Server Owner | Configure panel URL, API key, and server creator role |\n| `/ptero config` | Everyone | Show current panel configuration |\n| `/ptero panel` | Everyone | Check panel status and node health |\n| `/ptero nodes` | Manage Server | List all nodes with resource info |\n| `/ptero eggs` | Manage Server | List available eggs |\n| `/ptero server create` | Creator Role | Create a server (requires node + egg selection) |\n| `/ptero server list` | Everyone | List servers by user email |\n| `/ptero server info` | Everyone | Show detailed server information |\n| `/ptero server delete` | Manage Server | Delete a server |\n| `/ptero server start/stop/restart` | Everyone | Power actions on a server |\n\n---\n\n## Setup\n\n### Prerequisites\n\n- **Node.js** 18 or higher (below 22)\n- **MongoDB Atlas** cluster (or self-hosted MongoDB)\n- **Discord Bot** application with a bot token\n\n### Installation\n\n```bash\n# Clone the repository\ngit clone <your-repo-url> fenrir\ncd fenrir\n\n# Install dependencies\nnpm install\n\n# Create your environment file\ncp .env.example .env\n```\n\nEdit `.env` with your values, then start the bot:\n\n```bash\nnpm start\n```\n\n### Environment Variables\n\n| Variable | Required | Description |\n|----------|----------|-------------|\n| `TOKEN` | Yes | Your Discord bot token |\n| `CLIENT_ID` | Yes | Your Discord application/client ID |\n| `MONGODB_URI` | Yes | MongoDB connection string |\n| `EMOJI_GUILD_ID` | No | Server ID for hosting custom emojis |\n| `GROQ_API_KEY_1` | No | Groq API key for AI chat features |\n| `YOUTUBE_API_KEY` | No | YouTube Data API v3 key for verification |\n\nExample `.env`:\n\n```\nTOKEN=your_bot_token_here\nCLIENT_ID=your_client_id_here\nMONGODB_URI=mongodb+srv://user:pass@cluster.mongodb.net/fenrir\nEMOJI_GUILD_ID=123456789\nGROQ_API_KEY_1=gsk_your_key_here\nYOUTUBE_API_KEY=AIza_your_key_here\n```\n\n### Bot Permissions\n\nWhen inviting the bot, ensure it has these permissions:\n\n- `Send Messages`\n- `Read Message History`\n- `Manage Messages` (for prefix command cleanup)\n- `Create Public Threads`\n- `Send Messages in Threads`\n- `Embed Links`\n- `Use Application Commands`\n- `Manage Roles` (for Pomodoro rewards)\n\n---\n\n## How It Works\n\n### Suggestions\n\n1. An admin runs `/setsuggestions #channel` to configure the suggestion channel\n2. Users submit suggestions via `/suggest text` or by posting directly in the channel\n3. Each suggestion appears as a Components v2 card with upvote/downvote buttons\n4. A discussion thread is automatically created under each suggestion\n5. When upvotes cross the threshold (`/votethreshold`), the suggestion is forwarded to the logs channel\n6. Moderators can `/moderate` suggestions to approve, deny, or mark as considered\n5-hour slowmode is applied automatically to prevent spam.\n\n### Feedback\n\n1. An admin runs `/setfeedback #channel` to configure the feedback channel\n2. A prompt card with a \"Submit Your Review\" button is posted\n3. Users submit reviews via `/feedback rating text` with a 1-5 star rating\n4. Reviews appear as styled cards with star ratings and author info\n\n### Pomodoro Timer\n\n1. An admin runs `/setstudyvc` to require a specific voice channel\n2. Users start timers with `/pomodoro start 25` while in the study VC\n3. Leaving the VC automatically stops the timer\n4. Supports pause/resume, +5 min extension, group invites, and task assignment\n5. Reward roles are granted after configurable session thresholds (`/setpomodororeward`)\n\n### AI Chat\n\n1. An admin runs `/setchannel #ai-channel` to configure the AI channel\n2. Messages in that channel get AI responses via Groq (Llama 3.1 / Mixtral)\n3. Conversation history is maintained per-user (last 4 messages)\n4. Users can clear their history with `/clear`\n5. 5-second cooldown between messages per user\n\n### YouTube Verification\n\n1. An admin configures with `/ytverify setup <url>` (validates channel via YouTube Data API v3)\n2. Admin sets verification channel (`/ytverify channel #verify`) and reward role (`/ytverify role @role`)\n3. Admin enables with `/ytverify toggle`\n4. Users run `/ytverify verify` to get a unique 6-character code\n5. Users add the code to their YouTube channel **About → Description**\n6. Users click **Verify Now**, paste their YouTube URL\n7. Bot fetches the channel via YouTube API, checks if the description contains the code\n8. If code matches → role is assigned. Code expires after 5 minutes.\n\n### Pterodactyl Panel\n\n1. Server owner runs `/ptero setup <panel_url> <api_key> @creator_role` to configure\n2. Panel API key is stored per-guild in MongoDB (each server can have its own panel)\n3. Members with the creator role can create servers via `/ptero server create`\n4. Server creation requires selecting a node and egg, plus specifying RAM/CPU/disk\n5. Admins can list nodes, eggs, view all servers, delete, and manage power states\n6. Normal users cannot create servers — only members with the configured creator role\n\n### No Prefix System\n\n- Bot developers can grant users global no-prefix access via `/np`\n- Supports timed access (10 minutes to lifetime)\n- Auto-rewards boosters of partner servers with 60-day no-prefix\n- Expiry is checked every 10 minutes; expired users are automatically removed and notified\n\n---\n\n## Project Structure\n\n```\nfenrir/\n  index.js              # Entry point — loads events, connects MongoDB, starts bot\n  package.json\n  .env                  # Environment variables (not committed)\n  .env.example          # Template for environment variables\n  LICENSE               # Proprietary license\n  README.md\n\n  commands/             # Slash + prefix command handlers\n    calculator.js\n    clear.js\n    emoji.js\n    feedback.js\n    guildprofile.js\n    help.js\n    moderate.js\n    noprefix.js\n    npconfig.js\n    ping.js\n    pomodoro.js\n    purge.js\n    removefeedback.js\n    removesuggestions.js\n    say.js\n    servers.js\n    setchannel.js\n    setfeedback.js\n    setlogs.js\n    setpomodororeward.js\n    setstudyvc.js\n    setsuggestions.js\n    stats.js\n    steal.js\n    suggest.js\n    tasks.js\n    threadconfig.js\n    votethreshold.js\n    ytverify.js\n\n  events/               # Discord event handlers\n    guildMemberUpdate.js    # Boost-based no-prefix grants/removals\n    interactionCreate.js    # Slash commands, buttons, select menus\n    messageCreate.js        # Auto-suggest, AI auto-reply, prefix commands\n    ready.js                # Startup: register commands, restore timers\n    voiceStateUpdate.js     # Stop Pomodoro when leaving study VC\n\n  utils/                # Shared utilities\n    ai.js                   # Groq AI chat with conversation memory\n    calculator.js           # Calculator session state\n    commandLogic.js         # Suggestion/vote/feedback core logic\n    components.js           # All Components v2 builders\n    constants.js            # Prefix and color constants\n    db.js                   # MongoDB read/write interface\n    emojis.js               # Custom emoji resolution with fallbacks\n    loading.js              # Command loading card builders\n    mongodb.js              # Mongoose schemas and connection\n    noprefixLogic.js        # No-prefix grant/revoke/expiry logic\n    pomodoro.js             # Pomodoro timer, tasks, rewards\n```\n\n---\n\n## Credits\n\nFenrir was created and developed entirely by **arish_scholar**.\n\nAll design, architecture, and implementation credit goes to arish_scholar.\n\n---\n\n## License\n\nThis project is **proprietary** and closed-source.\n\nCopyright (c) 2024-2026 **arish_scholar**. All rights reserved.\n\nYou may **not** sell, share, modify, or distribute this software or its source code in any form. Unauthorized use will result in legal action.\n\nSee [LICENSE](./LICENSE) for full details.\n","readmeFilename":"README.md","_rev":"1-adefebcd52104725bbcc6814136b6c39"}