Added about command and more bot info

This commit is contained in:
2025-07-19 17:06:45 +03:00
parent a29587d0cb
commit e4e9db2f84
4 changed files with 24 additions and 2 deletions

View File

@@ -1,5 +1,20 @@
// Bot info
#define BOT_NAME "The Bartender bot"
#define BOT_VERSION "v0.2"
#define CURRENCY_NAME "Night Coin"
// Command ping
#define COMMAND_PING_DESCRIPTION "Ping-pong test"
// Command about
#define COMMAND_ABOUT_DESCRIPTION "Info about the bot"
#define COMMAND_ABOUT_RESPONSE \
"## " BOT_NAME " " BOT_VERSION \
"\n-> Written by <@!607952795794145281>.\n-> Source code " \
"https://git.thenight.club/cat/BartenderBot.\n-> Made with " \
"[D++](https://dpp.dev/) and tears."
// Command balance/bal
#define COMMAND_BALANCE_DESCRIPTION "See someone's balance of " CURRENCY_NAME
#define COMMAND_BALANCE_USER_DESCRIPTION \

View File

@@ -8,3 +8,4 @@
// Replace locale_en with any available one
#include "languages/locale_en.hpp"

View File

@@ -13,7 +13,10 @@ void deleteCommands(const dpp::ready_t &event, dpp::cluster &bot) {
void createCommands(const dpp::ready_t &event, dpp::cluster &bot) {
bot.global_command_create(
dpp::slashcommand("ping", "Ping-pong test", bot.me.id));
dpp::slashcommand("ping", COMMAND_PING_DESCRIPTION, bot.me.id));
bot.guild_command_create(
dpp::slashcommand("about", COMMAND_ABOUT_DESCRIPTION, bot.me.id), GUILD);
// Money related stuff
bot.guild_command_create(

View File

@@ -1,4 +1,7 @@
#include "../../settings.hpp"
#include <dpp/dispatcher.h>
void commandPing(const dpp::slashcommand_t &event) { event.reply("Pong"); }
void commandAbout(const dpp::slashcommand_t &event) { event.reply("Pong"); }
void commandAbout(const dpp::slashcommand_t &event) {
event.reply(COMMAND_ABOUT_RESPONSE);
}