{"id":16444270,"url":"https://github.com/evolutionx-10/discordbot","last_synced_at":"2025-10-03T19:50:03.504Z","repository":{"id":53841402,"uuid":"518930739","full_name":"EvolutionX-10/discordbot","owner":"EvolutionX-10","description":"A simple discord bot with custom handler made in discord.js v14","archived":false,"fork":false,"pushed_at":"2025-01-31T14:26:28.000Z","size":3865,"stargazers_count":19,"open_issues_count":0,"forks_count":3,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-01T03:16:47.093Z","etag":null,"topics":["discord","discord-js","discordjs","discordjs-bot","discordjsv14","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/EvolutionX-10.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2022-07-28T17:07:12.000Z","updated_at":"2025-01-31T14:26:31.000Z","dependencies_parsed_at":"2023-10-15T03:42:35.870Z","dependency_job_id":null,"html_url":"https://github.com/EvolutionX-10/discordbot","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvolutionX-10%2Fdiscordbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvolutionX-10%2Fdiscordbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvolutionX-10%2Fdiscordbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvolutionX-10%2Fdiscordbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EvolutionX-10","download_url":"https://codeload.github.com/EvolutionX-10/discordbot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244113646,"owners_count":20400187,"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":["discord","discord-js","discordjs","discordjs-bot","discordjsv14","typescript"],"created_at":"2024-10-11T09:23:50.098Z","updated_at":"2025-10-03T19:49:58.467Z","avatar_url":"https://github.com/EvolutionX-10.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\u003ch1\u003e\n\tDiscord bot written in TypeScript\n\u003c/h1\u003e\n\t\u003cbr /\u003e\n\t\u003cp\u003e\n\t\t\u003ca href=\"https://discord.js.org\"\u003e\u003cimg src=\"https://discord.js.org/static/logo.svg\" width=\"546\" alt=\"discord.js\" /\u003e\u003c/a\u003e\n\t\u003c/p\u003e\n\u003c/div\u003e\n\n## About the project\n\nThis project is not intended to be a fully-functional bot, but rather a simple handler for handling of commands and events. I've seen a lot of people finding it hard to make their own handlers in TypeScript and ending up using `any` everywhere.\nThis place can be a good start for you to begin your journey of making a bot in TypeScript without depending on other dedicated handlers. Custom handlers have this advantage that its your own handler, you can add whatever feature you like and whatever you want.\n\n## Features\n\n- Written in [TypeScript](https://www.typescriptlang.org/) 😋\n- Uses [v14.17](https://discordjs.dev/) 😎\n- Fully ESM based 😍\n- Minimal dependencies ⚡\n- Automated Registering/Updating/Deleting/Syncing of Application Commands 😮\n- Default commands 😄\n  - Chat Input (Slash) Commands [`ping`, `eval`, `paginate`, `survey`]\n  - User Commands [`pong`]\n  - Message Commands [`Save`]\n  - Legacy Commands [`say`, `paginate`, `survey`]\n- Supports Message Commands, Chat Input Commands, ContextMenu Commands, and more! 😜\n- Type safe, simple, and easy to understand 👍\n- Valid and Robust Autocompletions in your IDE for commands and listeners 😲\n- Extended Client with useful features 🤩\n- Colorful and detailed logging 💡\n- Paginator Class for easy pagination using embeds, buttons, and select menus! 😉\n- Resolver Class for easy resolving of multi mentions in chat input command option! 😳\n- Prompt Class if you want to ask series of questions and have message content intent 🤗\n\n## Before you begin\n\nThis guide assumes you have **solid** understanding of JavaScript and at least basic understanding of TypeScript. If you don't, I recommend you start with the [JavaScript guide](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide) and [TypeScript book](https://www.typescriptlang.org/docs/).\n\n## Getting Started\n\nClick on [`Use this template`](https://github.com/EvolutionX-10/discordbot/generate) button and it will generate a new repository based on this repository in your account. Once done, you may proceed to clone your repository locally using git[^git]. \u003cbr /\u003e\nYou also need to have a Discord Bot application created. If you haven't done it yet, you can do it by following the guide [here](https://discordjs.guide/preparations/setting-up-a-bot-application.html#creating-your-bot).\n\n## Dev Setup\n\nNow you can proceed to install dependencies. \u003cbr /\u003e\nAfter that, we will compile our TypeScript code to JavaScript\n\n\u003e **Note**\n\u003e This project uses `bun` to manage dependencies. If you don't have `bun` installed, you can read [here](https://bun.sh/docs/installation) on how to install it.\n\n```bash\nbun install\n```\n\n### Setting token\n\n1. Rename `.env.example` to `.env`\n2. Add your token to the `.env` file in this format\n\n```\nDISCORD_TOKEN=abc\n```\n\n### Starting the bot\n\nNow we can start the bot using `bun dev` script.\n\n```bash\nbun dev\n```\n\n## Production Setup\n\nTo run in production environment, we use Docker. You can read more about it [here](https://docs.docker.com/get-started/).\n\n### Building the image\n\n```bash\ndocker build -t discordbot .\n```\n\n### Running the image\n\n```bash\ndocker run -d --name discordbot -e DISCORD_TOKEN=abc discordbot\n```\n\n## Commands and Listeners\n\n\u003cdetails\u003e\n\u003csummary\u003eCommands\u003c/summary\u003e\n\n#### Example\n\n```ts\nimport { CommandType } from '#lib/enums';\nimport { Command } from '#lib/structures';\nimport { MessageFlags } from 'discord.js';\n\nexport default new Command({\n\ttype: CommandType.ChatInput,\n\tdescription: 'Ping Pong!!',\n\tasync commandRun(interaction) {\n\t\treturn interaction.reply({ content: 'Pong!', flags: MessageFlags.Ephemeral });\n\t},\n\tasync messageRun(message) {\n\t\treturn message.channel.send('Pong!');\n\t},\n});\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\n\u003csummary\u003eListeners\u003c/summary\u003e\n\n#### Example\n\n```ts\nimport { Listener } from '#lib/structures';\n\nexport default new Listener({\n\tevent: 'ready',\n\tonce: true,\n\trun(client) {\n\t\tclient.logger.info(`Logged in as ${client.user.tag}`);\n\t},\n});\n```\n\n\u003c/details\u003e\n\n## Contributing\n\nTo contribute to this repository, feel free to fork the repository and make changes. Once you have made your changes, you can submit a pull request.\nA change should have a valid reason, and features should be added only if it's basic.\n\n1. Fork the repository and select the **main** branch.\n2. Create a new branch and make your changes.\n3. Make sure you use a proper code formatter. [^lint]\n4. Make sure you have a good commit message.[^commit]\n5. Push your changes.\n6. Submit a pull request [here][pr].\n\u003c!-- References --\u003e\n\n[^git]: It's recommended to have [git](https://git-scm.com/) installed on your machine.\n\n[^lint]: We recommend using [`prettier`] to style your code.\n\n[^commit]: We strongly follow the [`Commit Message Conventions`]. This is important when commiting your code for a PR.\n\n[`prettier`]: https://prettier.io/\n[`commit message conventions`]: https://conventionalcommits.org/en/v1.0.0/\n[pr]: https://github.com/EvolutionX-10/discordbot/pulls\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevolutionx-10%2Fdiscordbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevolutionx-10%2Fdiscordbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevolutionx-10%2Fdiscordbot/lists"}