{"id":27329548,"url":"https://github.com/brainboxdotcc/command_example","last_synced_at":"2025-04-12T12:55:44.459Z","repository":{"id":37797263,"uuid":"502129527","full_name":"brainboxdotcc/command_example","owner":"brainboxdotcc","description":"An example of splitting slash commands into separate files using D++","archived":false,"fork":false,"pushed_at":"2022-08-14T11:50:30.000Z","size":24,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-04-25T00:11:08.235Z","etag":null,"topics":["cpp","cpp17","discord","discord-api","discord-api-v10","discord-api-wrapper","discord-bot","dpp"],"latest_commit_sha":null,"homepage":"https://dpp.dev/","language":"C++","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/brainboxdotcc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-06-10T17:36:58.000Z","updated_at":"2023-11-08T15:26:59.000Z","dependencies_parsed_at":"2022-08-19T02:20:52.302Z","dependency_job_id":null,"html_url":"https://github.com/brainboxdotcc/command_example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brainboxdotcc%2Fcommand_example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brainboxdotcc%2Fcommand_example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brainboxdotcc%2Fcommand_example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brainboxdotcc%2Fcommand_example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brainboxdotcc","download_url":"https://codeload.github.com/brainboxdotcc/command_example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248571865,"owners_count":21126520,"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":["cpp","cpp17","discord","discord-api","discord-api-v10","discord-api-wrapper","discord-bot","dpp"],"created_at":"2025-04-12T12:55:43.923Z","updated_at":"2025-04-12T12:55:44.446Z","avatar_url":"https://github.com/brainboxdotcc.png","language":"C++","readme":"# D++ Multiple Command Example\n\nThis is a C++ bot for demonstrating a simple way to have each command in a separate file while using the D++ library.\n\nThere are many ways to approach this, and this method is an example of how to do it without having to have a base class and inheritence. All that is needed in each command file is one function which matches a format declares in `command.h`.\n\nThree sample commands are implemented called `ping`, `info` and `help`.\n\n## Compilation\n\n    mkdir build\n    cd build\n    cmake ..\n    make -j\n\nIf DPP is installed in a different location you can specify the root directory to look in while running cmake \n\n    cmake .. -DDPP_ROOT_DIR=\u003cyour-path\u003e\n\n## Running the bot\n\nCreate a config.json in the directory above the build directory:\n\n```json\n{\n\"token\": \"your bot token here\", \n}\n```\n\nStart the bot:\n\n    cd build\n    ./command_example\n\nUsing the bot:\n\nType any one of the three example commands to see it running. Note that this bot registers global commands, and uses bulk registration, so any other global commands registered upon this bot token will be **replaced** by the three examples in this program!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrainboxdotcc%2Fcommand_example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrainboxdotcc%2Fcommand_example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrainboxdotcc%2Fcommand_example/lists"}