{"id":20522081,"url":"https://github.com/pannh/discoda","last_synced_at":"2025-08-21T22:17:20.784Z","repository":{"id":218087063,"uuid":"743616331","full_name":"PannH/discoda","owner":"PannH","description":"Discord.js framework to build your bot more efficiently with more focus on what really matters, rather than boilerplate code","archived":false,"fork":false,"pushed_at":"2024-02-02T21:37:42.000Z","size":287,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-16T15:51:25.716Z","etag":null,"topics":["bot","discord","discordjs","framework","handler","library","nodejs","typescript"],"latest_commit_sha":null,"homepage":"https://pannh.github.io/discoda/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PannH.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-01-15T16:04:32.000Z","updated_at":"2024-01-19T16:53:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"102e1124-2516-4dfb-9ae3-dcb0e4797b49","html_url":"https://github.com/PannH/discoda","commit_stats":null,"previous_names":["pannh/discoda"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PannH%2Fdiscoda","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PannH%2Fdiscoda/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PannH%2Fdiscoda/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PannH%2Fdiscoda/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PannH","download_url":"https://codeload.github.com/PannH/discoda/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242127491,"owners_count":20076123,"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","discord","discordjs","framework","handler","library","nodejs","typescript"],"created_at":"2024-11-15T22:33:53.890Z","updated_at":"2025-03-06T00:28:31.657Z","avatar_url":"https://github.com/PannH.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n   \u003cimg\n      src=\"assets/discoda_banner.svg\"\n      width=\"500\"\n   /\u003e\n\u003c/p\u003e\n\n# Discoda\nDiscord.js framework to build your bot more efficiently with more focus on what really matters, rather than boilerplate code.\n\u003cbr /\u003e\n\u003csub\u003eMade in TypeScript, for TypeScript\u003c/sub\u003e\n\n## Links\n- [GitHub](https://github.com/PannH/discoda)\n- [Documentation](https://pannh.github.io/discoda/)\n- [npm](https://npmjs.com/package/discoda)\n- [Developer's Discord](https://discord.com/users/667302589213310997) - \\@pannh (in case you'd like help)\n- [Discord.js Documentation](https://discordjs.dev/docs/packages/discord.js/14.14.1)\n\n## Installation\n```shell\n# npm\nnpm install discoda\n\n# yarn\nyarn add discoda\n\n# pnpm\npnpm add discoda\n```\n\n## Basic usage example\nInitialize your client\n```ts\n// File: src/index.ts\nimport { Client } from 'discoda';\n\n// See more: https://pannh.github.io/discoda/classes/Client.html\nconst client = new Client({\n   intents: [\n      'Guilds',\n      'GuildMembers',\n      'GuildMessages',\n      'MessageContent'\n   ],\n   handlerPaths: {\n      events: 'src/events',\n      slashCommands: 'src/commands'\n   }\n});\n\nclient.login('YOUR_CLIENT_TOKEN');\n```\n\u003csup\u003eThe code above is written in TypeScript, adapt it if you code in JavaScript\u003c/sup\u003e\n\nHandle the `ready` event\n```ts\n// File: src/events/ready.ts\nimport { Event } from 'discoda';\n\n// See more: https://pannh.github.io/discoda/classes/Event.html\nexport default new Event({\n   name: 'ready',\n   triggerOnce: true\n}, (client) =\u003e {\n\n   console.log('Client is ready to use');\n\n   // This will register all handled commands to Discord (here: slash commands)\n   client.registerCommands()\n      .then(() =\u003e console.log('Registered commands'))\n      .catch(() =\u003e console.error('Failed to register commands'))\n\n});\n```\n\u003csup\u003eThe code above is written in TypeScript, adapt it if you code in JavaScript\u003c/sup\u003e\n\nCreate a `/ping` command\n```ts\n// File: src/commands/ping.ts\nimport { SlashCommand } from 'discoda';\n\n// See more: https://pannh.github.io/discoda/classes/SlashCommand.html\nexport default new SlashCommand({\n   data: {\n      name: 'ping',\n      description: 'Shows the bot latency'\n   }\n}, (client, interaction) =\u003e {\n   interaction.reply(`Pong! ${client.ws.ping}ms`);\n});\n```\n\u003csup\u003eThe code above is written in TypeScript, adapt it if you code in JavaScript\u003c/sup\u003e\n\n🎉 Done! In only 3 files, you already have a fully working bot with handlers for events and slash commands.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpannh%2Fdiscoda","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpannh%2Fdiscoda","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpannh%2Fdiscoda/lists"}