Added about command and more bot info
This commit is contained in:
@@ -1,5 +1,20 @@
|
|||||||
|
// Bot info
|
||||||
|
#define BOT_NAME "The Bartender bot"
|
||||||
|
#define BOT_VERSION "v0.2"
|
||||||
|
|
||||||
#define CURRENCY_NAME "Night Coin"
|
#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
|
// Command balance/bal
|
||||||
#define COMMAND_BALANCE_DESCRIPTION "See someone's balance of " CURRENCY_NAME
|
#define COMMAND_BALANCE_DESCRIPTION "See someone's balance of " CURRENCY_NAME
|
||||||
#define COMMAND_BALANCE_USER_DESCRIPTION \
|
#define COMMAND_BALANCE_USER_DESCRIPTION \
|
||||||
|
@@ -8,3 +8,4 @@
|
|||||||
|
|
||||||
// Replace locale_en with any available one
|
// Replace locale_en with any available one
|
||||||
#include "languages/locale_en.hpp"
|
#include "languages/locale_en.hpp"
|
||||||
|
|
||||||
|
@@ -13,7 +13,10 @@ void deleteCommands(const dpp::ready_t &event, dpp::cluster &bot) {
|
|||||||
|
|
||||||
void createCommands(const dpp::ready_t &event, dpp::cluster &bot) {
|
void createCommands(const dpp::ready_t &event, dpp::cluster &bot) {
|
||||||
bot.global_command_create(
|
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
|
// Money related stuff
|
||||||
bot.guild_command_create(
|
bot.guild_command_create(
|
||||||
|
@@ -1,4 +1,7 @@
|
|||||||
|
#include "../../settings.hpp"
|
||||||
#include <dpp/dispatcher.h>
|
#include <dpp/dispatcher.h>
|
||||||
|
|
||||||
void commandPing(const dpp::slashcommand_t &event) { event.reply("Pong"); }
|
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);
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user