{"id":24778283,"url":"https://github.com/redfox-studios/discord-bot","last_synced_at":"2025-03-24T02:17:47.819Z","repository":{"id":260884632,"uuid":"882623028","full_name":"RedFox-Studios/discord-bot","owner":"RedFox-Studios","description":null,"archived":true,"fork":false,"pushed_at":"2024-11-07T19:53:36.000Z","size":22,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-24T02:17:44.432Z","etag":null,"topics":["commands","discord","discord-api","discord-bot","js","json","nodejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RedFox-Studios.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-03T10:09:25.000Z","updated_at":"2025-02-16T14:31:08.000Z","dependencies_parsed_at":"2024-11-03T11:18:27.719Z","dependency_job_id":"72227dd1-7dd6-452d-bc8f-38bfc3b2d7e8","html_url":"https://github.com/RedFox-Studios/discord-bot","commit_stats":null,"previous_names":["redfox-studios/discordbot","redfox-studios/discord-bot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedFox-Studios%2Fdiscord-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedFox-Studios%2Fdiscord-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedFox-Studios%2Fdiscord-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedFox-Studios%2Fdiscord-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RedFox-Studios","download_url":"https://codeload.github.com/RedFox-Studios/discord-bot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245195970,"owners_count":20575938,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["commands","discord","discord-api","discord-bot","js","json","nodejs"],"created_at":"2025-01-29T08:18:30.298Z","updated_at":"2025-03-24T02:17:47.796Z","avatar_url":"https://github.com/RedFox-Studios.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Advanced Discord Bot# Advanced Discord Bot\n\nA feature-rich Discord bot with slash commands, error handling, cooldowns, permissions, pagination, and more.\n\n## Table of Contents\n\n- [Features](#features)\n- [Setup](#setup)\n- [File Structure](#file-structure)\n- [Configuration](#configuration)\n- [Command System](#command-system)\n- [Logging System](#logging-system)\n- [Cooldowns and Permissions](#cooldowns-and-permissions)\n- [Pagination Utility](#pagination-utility)\n- [Adding New Commands](#adding-new-commands)\n- [Deployment](#deployment)\n- [Contributing](#contributing)\n\n## Features\n\n- Slash command support\n- Error handling and graceful degradation\n- Cooldown system\n- Permission-based command access\n- Pagination for long responses\n- Interactive help menu\n- Moderation tools\n- Logging system\n\n## Setup\n\n1. Clone the repository\n2. Install dependencies:\n\n```\nnpm install\n```\n3. Copy `config.example.json` to `config.json` and fill in your bot token, client ID, and guild ID3. Copy `config.example.json` to `config.json` and fill in your bot token, client ID, and guild ID\n4. Register slash commands:\n\n```\nnode deploy-commands.js\n```\n\n5. Start the bot:\n\n```\nnode index.js\n```\n\n## File Structure\n\n```\ndiscord-bot/\n│\n├── commands/\n│   ├── fun/\n│   │   └── choose.js\n│   ├── general/\n│   │   └── help.js\n│   └── moderation/\n│       └── kick.js\n│\n├── logs/\n│   ├── errors.log\n│   ├── servers.log\n│   ├── commands.log\n│   └── server_list.log\n│\n├── utils/\n│   └── pagination.js\n│\n├── config.json\n├── deploy-commands.js\n├── index.js\n├── logger.js\n└── README.md\n```\n\n## Configuration\n\nEdit `config.json` to customize the bot's behavior:\n\n```json\n{\n  \"token\": \"YOUR_BOT_TOKEN\",\n  \"clientId\": \"YOUR_CLIENT_ID\",\n  \"guildId\": \"YOUR_GUILD_ID\",\n  \"logging\": {\n    \"errors\": true,\n    \"servers\": true,\n    \"commands\": true\n  },\n  \"cooldowns\": {\n    \"general\": 3,\n    \"moderation\": 5,\n    \"fun\": 2,\n    \"utility\": 3\n  },\n  \"permissions\": {\n    \"general\": \"SEND_MESSAGES\",\n    \"moderation\": \"MODERATE_MEMBERS\",\n    \"fun\": \"SEND_MESSAGES\",\n    \"utility\": \"SEND_MESSAGES\"\n  }\n}\n```\n\n## Command System\n\nCommands are organized into categories (folders) within the `commands/` directory. Each command is a separate file that exports an object with the following structure:\n\n```javascript\n module.exports = {module.exports = {\n  category: 'category_name',\n  data: new SlashCommandBuilder()\n    .setName('command_name')\n    .setDescription('Command description'),\n  async execute(interaction) {\n    // Command logic here\n  },\n};\n```\n\n## Logging System\n\nThe bot automatically creates a `logs/` directory with the following log files:\n\n- `errors.log`: Any errors encountered during bot operation\n- `servers.log`: Server join/leave events\n- `commands.log`: Command usage\n- `server_list.log`: Up-to-date list of servers the bot is in\n\n\nLogging can be configured in `config.json`.\n\n## Cooldowns and Permissions\n\nCooldowns and permissions are defined in `config.json` for each command category. The bot automatically applies these settings to all commands within a category.\n\n## Pagination Utility\n\nThe `utils/pagination.js` file provides a utility for paginating long responses. Use it in your commands like this:\n\n```javascript\n const pagination = require('../../utils/pagination');const pagination = require('../../utils/pagination');\n\n// ... in your command's execute function:\nconst pages = [\n  new EmbedBuilder().setDescription('Page 1 content'),\n  new EmbedBuilder().setDescription('Page 2 content'),\n  // ... more pages\n];\n\npagination(interaction, pages);\n```\n\n## Adding New Commands\n\n1. Create a new file in the appropriate category folder within `commands/`\n2. Use the following template:\n\n\n```javascript\n const { SlashCommandBuilder } = require('discord.js');const { SlashCommandBuilder } = require('discord.js');\n\nmodule.exports = {\n  category: 'category_name',\n  data: new SlashCommandBuilder()\n    .setName('command_name')\n    .setDescription('Command description'),\n  async execute(interaction) {\n    // Command logic here\n  },\n};\n\n```\n\n3. Run `node deploy-commands.js` to register the new command with Discord\n\n\n## Deployment\n\n1. Ensure all your changes are committed and pushed to your repository\n2. Set up a hosting platform (e.g., Heroku, DigitalOcean, or a VPS)\n3. Configure environment variables for your bot token and other sensitive information\n4. Deploy your bot to the hosting platform\n5. Ensure the bot starts correctly and can connect to Discord\n\n\n## Contributing\n\n1. Fork the repository\n2. Create a new branch: `git checkout -b feature-name`\n3. Make your changes and commit them: `git commit -m 'Add some feature'`\n4. Push to the branch: `git push origin feature-name`\n5. Submit a pull request\n\n\nPlease ensure your code follows the existing style and includes appropriate documentation.\n\n## License\n\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredfox-studios%2Fdiscord-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredfox-studios%2Fdiscord-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredfox-studios%2Fdiscord-bot/lists"}