{"id":16170411,"url":"https://github.com/corentinth/discot","last_synced_at":"2025-07-05T07:06:21.584Z","repository":{"id":42928480,"uuid":"237822454","full_name":"CorentinTh/discot","owner":"CorentinTh","description":"Simple discord bot creation framework.","archived":false,"fork":false,"pushed_at":"2023-01-05T07:36:17.000Z","size":427,"stargazers_count":6,"open_issues_count":12,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-27T09:42:26.686Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/CorentinTh.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-02T19:14:44.000Z","updated_at":"2025-06-08T09:30:44.000Z","dependencies_parsed_at":"2023-02-03T18:46:05.659Z","dependency_job_id":null,"html_url":"https://github.com/CorentinTh/discot","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/CorentinTh/discot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CorentinTh%2Fdiscot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CorentinTh%2Fdiscot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CorentinTh%2Fdiscot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CorentinTh%2Fdiscot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CorentinTh","download_url":"https://codeload.github.com/CorentinTh/discot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CorentinTh%2Fdiscot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263699781,"owners_count":23497963,"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":[],"created_at":"2024-10-10T03:18:40.610Z","updated_at":"2025-07-05T07:06:21.553Z","avatar_url":"https://github.com/CorentinTh.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![discot-logo](./.github/discot-logo.png)\n----\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/CorentinTh/discot/actions\"\u003e\u003cimg src=\"https://github.com/CorentinTh/discot/workflows/Node%20CI/badge.svg\" alt=\"Node CI\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://www.npmjs.com/package/discot\"\u003e\u003cimg alt=\"npm\" src=\"https://img.shields.io/npm/v/discot\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://www.npmjs.com/package/discot\"\u003e\u003cimg alt=\"npm\" src=\"https://img.shields.io/npm/dw/discot\"\u003e\u003c/a\u003e\n    \u003ca href=\"LICENSE\"\u003e\u003cimg alt=\"NPM\" src=\"https://img.shields.io/npm/l/discot\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nCreate simple, yet powerful discord bots focusing on commands.\n\n## What is it ?\n**Discot** is a wrapper around [discord.js](https://discord.js.org/) to simplify the creation of server bots. It permists to focus on the creation of commands instead of spending time working with discord's API.\n\n## Usage\n### Installation\n**Discot** can be installed using yarn or npm.\n\n```shell\nnpm install discot\n# or\nyarn add discot\n```\n### Example\n```javascript\nconst bot = new Bot({\n    token: 'discord_token', // default value: process.env.DISCORD_TOKEN\n    prefix: '!'             // default value: '!'\n});\n\nbot.addCommand({\n        name: 'ping',\n        description: 'Reply pong',\n        action: message =\u003e message.channel.send('pong')\n    })\n    .addCommand({\n        name: 'say',\n        description: 'Send the text passed as first argument. Usage: \"!say hello\"',\n        action: (message, args) =\u003e message.channel.send(args[0]),\n        requiredArgCount: 0\n    })\n    .start(() =\u003e console.log('Bot started.'));\n```\n\n![discord-example](.github/discord-example.png)\n\n`message` in the `action` method for a command is the object from [discord.js](https://discord.js.org/#/docs/main/stable/class/Message) \n\n### API\n#### Bot constructor\n```javascript\nconst bot = new Bot({\n    token: 'discord_token', // default value: process.env.DISCORD_TOKEN\n    prefix: '!'             // default value: '!'\n});\n```\nSet your discord token in the env variable **DISCORD_TOKEN** (use [dotenv](https://www.npmjs.com/package/dotenv)).\n\n#### bot.addCommand(command)\n```javascript\nbot.addCommand({\n    name: 'ping',              // name of the command, the one to type\n    description: 'Reply pong', // description displayed in the help message\n    action: message =\u003e message.channel.send('pong'), // action to execute when the command is triggered\n    requiredArgCount: 1        // amount of required parameters for the command for validation\n})                             \n```\n`message` in the `action` method for a command is the object from [discord.js](https://discord.js.org/#/docs/main/stable/class/Message) \n\n#### bot.start(callback?)\n```javascript\nbot.start(() =\u003e console.log('Bot started.'))\n```\nThe callback is triggered when the bot is started.\n\n## Contribute\n**Pull requests are welcome !** Feel free to contribute.\n\n## Credits\nCoded with ❤️ by [Corentin Thomasset](//corentin-thomasset.fr).\n\n## License\nThis project is under the [MIT license](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorentinth%2Fdiscot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcorentinth%2Fdiscot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorentinth%2Fdiscot/lists"}