{"id":16438796,"url":"https://github.com/typicalbot/commands","last_synced_at":"2025-02-25T21:17:38.549Z","repository":{"id":45932595,"uuid":"428803664","full_name":"typicalbot/commands","owner":"typicalbot","description":"Minimalistic slash command library for Discord.js","archived":false,"fork":false,"pushed_at":"2021-12-12T19:14:02.000Z","size":49,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-01-08T10:08:41.250Z","etag":null,"topics":["discordjs","framework","library","slash-commands"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/typicalbot.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}},"created_at":"2021-11-16T20:28:13.000Z","updated_at":"2021-12-12T19:13:56.000Z","dependencies_parsed_at":"2022-09-26T21:31:46.015Z","dependency_job_id":null,"html_url":"https://github.com/typicalbot/commands","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typicalbot%2Fcommands","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typicalbot%2Fcommands/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typicalbot%2Fcommands/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typicalbot%2Fcommands/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/typicalbot","download_url":"https://codeload.github.com/typicalbot/commands/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240746953,"owners_count":19850998,"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":["discordjs","framework","library","slash-commands"],"created_at":"2024-10-11T09:06:21.845Z","updated_at":"2025-02-25T21:17:38.474Z","avatar_url":"https://github.com/typicalbot.png","language":"TypeScript","readme":"# TypicalBot Commands\n\nMinimalistic slash command library for [Discord.js](https://github.com/discordjs/discord.js).\n\n## Handling Interaction Event\n\nIt is recommended that you use [@typicalbot/events](https://github.com/typicalbot/events) with this library. However, we\nhave provided an example if you choose not to use [@typicalbot/events](https://github.com/typicalbot/events).\n\n### TypicalBot Events\n\n```ts\nimport EventHandler from '@typicalbot/events';\n\nconst SlashCommandHandler: EventHandler\u003c'interactionCreate'\u003e = async (client, interaction) =\u003e {\n    if (interaction.isCommand()) return;\n\n    const name = interaction.commandName;\n    if (client.commands.has(name)) return; // This is a Collection of commands\n\n    try {\n        await client.commands.get(name)?.(client, interaction);\n    } catch {\n        await interaction.reply({\n            content: 'An error occurred while trying to execute that command.'\n        });\n    }\n}\n```\n\n### Discord.js\n\n```ts\nclient.on('interactionCreate', async (interaction) =\u003e {\n    if (interaction.isCommand()) return;\n\n    const name = interaction.commandName;\n    if (client.commands.has(name)) return; // This is a Collection of commands\n\n    try {\n        await client.commands.get(name)?.(client, interaction);\n    } catch {\n        await interaction.reply({\n            content: 'An error occurred while trying to execute that command.'\n        });\n    }\n});\n```\n\n## License\n\nTypicalBot Commands is an open source software licensed under the [Apache 2.0 license](LICENSE).","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftypicalbot%2Fcommands","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftypicalbot%2Fcommands","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftypicalbot%2Fcommands/lists"}