{"id":24901625,"url":"https://github.com/ruskydev/discord-bot-template","last_synced_at":"2026-01-28T04:03:43.945Z","repository":{"id":257646471,"uuid":"858909367","full_name":"RuskyDev/discord-bot-template","owner":"RuskyDev","description":"An advanced template for Discord bots with event handling, prefix and slash commands, user app support, cooldown management, and many customization options.","archived":false,"fork":false,"pushed_at":"2025-03-20T20:12:16.000Z","size":46,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-20T21:47:04.691Z","etag":null,"topics":["bot","cooldown","discord","discordjs","events","nodejs","prefix-commands","slash-commands-handler","template","v14"],"latest_commit_sha":null,"homepage":"https://rusky.is-a.dev","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/RuskyDev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":null,"patreon":"ruskydev","open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":"ruskydev","thanks_dev":null,"custom":null}},"created_at":"2024-09-17T18:36:29.000Z","updated_at":"2025-03-20T20:12:20.000Z","dependencies_parsed_at":"2025-01-27T16:30:57.519Z","dependency_job_id":"5bbdb22d-6ddb-4a08-b0d3-0690a908e033","html_url":"https://github.com/RuskyDev/discord-bot-template","commit_stats":{"total_commits":10,"total_committers":1,"mean_commits":10.0,"dds":0.0,"last_synced_commit":"547860fdec9f07cf44413120cfc96158722448d1"},"previous_names":["ruskydev/discord-bot-template-v14"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RuskyDev%2Fdiscord-bot-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RuskyDev%2Fdiscord-bot-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RuskyDev%2Fdiscord-bot-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RuskyDev%2Fdiscord-bot-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RuskyDev","download_url":"https://codeload.github.com/RuskyDev/discord-bot-template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248820019,"owners_count":21166588,"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":["bot","cooldown","discord","discordjs","events","nodejs","prefix-commands","slash-commands-handler","template","v14"],"created_at":"2025-02-01T21:16:52.293Z","updated_at":"2026-01-28T04:03:43.939Z","avatar_url":"https://github.com/RuskyDev.png","language":"JavaScript","funding_links":["https://patreon.com/ruskydev","https://buymeacoffee.com/ruskydev"],"categories":[],"sub_categories":[],"readme":"# Discord Bot Template\nA modern Discord.js bot template\n\n## Features\n* 4 Customizable options via `config.js`\n* Slash Command Handler\n* Prefix Command Handler\n* Event Handler\n* Cooldown Handler\n\n## Installation\n1. Clone the repository:\n\n```bash\ngit clone https://github.com/RuskyDev/discord-bot-template.git\ncd discord-bot-template\n```\n\n2. Install dependencies:\n\n```bash\nnpm install\n```\n\n3. Copy `.env.example` to `.env` and add your credentials:\n\n```\nDISCORD_BOT_TOKEN=your_discord_bot_token\nDISCORD_BOT_CLIENT_ID=your_discord_bot_client_id\n```\n\n4. Configure `config.js` to adjust the bot settings:\n\n```js\nexport default {\n    PREFIX: '!',                  // Prefix for prefix commands\n    ACTIVITY_TEXT: 'with Discord',// Bot presence text\n    ACTIVITY_TYPE: 'Playing',     // Playing, Watching, Listening, Competing.\n    ACTIVITY_STATUS: 'Online',    // Online, Idle, DoNotDisturb, Invisible\n};\n```\n\n5. Start the bot:\n\nFor development:\n\n```bash\nnpm run dev\n```\n\nFor production:\n\n```bash\nnpm start\n```\n\n## Commands\n\n### Prefix Commands\nStored in `./src/commands/prefix` and triggered using the prefix from `config.js`. Commands can have cooldowns in seconds.\n\nExample – `ping` command:\n\n```js\nexport default {\n    name: 'ping',\n    description: 'Replies with Pong!',\n    cooldown: 5,\n    execute(message) {\n        message.channel.send('Pong!');\n    },\n};\n```\n\n### Slash Commands\nStored in `./src/commands/slash` and automatically registered globally when the bot starts.\n\nExample – `ping` slash command:\n\n```js\nimport { SlashCommandBuilder } from '@discordjs/builders';\n\nexport default {\n    data: new SlashCommandBuilder()\n        .setName('ping')\n        .setDescription('Replies with Pong!')\n        .setIntegrationTypes(0, 1) // 0: Guild Install, 1: User Install\n        .setContexts(0, 1, 2),   // 0: Guild, 1: Bot DM, 2: Group Chat\n    cooldown: 5,\n    async execute(interaction) {\n        await interaction.reply('Pong!');\n    },\n};\n```\n\n## Events\nStored in `./src/events` and automatically loaded on bot start.\n\nExample – `messageCreate` event:\n\n```js\nexport default {\n    name: 'messageCreate',\n    once: false,\n    async execute(message, client) {\n        console.log(`Message received: ${message.content}`);\n    },\n};\n```\n\n## Cooldowns\nCommands can have cooldowns defined per command in seconds:\n\n```js\nexport default {\n    name: 'ping',\n    cooldown: 5,\n    async execute(message) {\n        message.channel.send('Pong!');\n    },\n};\n```\n\n## License\nThis project is licensed under the [MIT License](./LICENSE).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruskydev%2Fdiscord-bot-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fruskydev%2Fdiscord-bot-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruskydev%2Fdiscord-bot-template/lists"}