Compare commits

...

2 Commits

Author SHA1 Message Date
cat
05335be2f4 Making it so that Settings.hpp replaces token.h 2025-07-19 03:29:19 +03:00
cat
063a035b1c better naming for tabbing 2025-07-19 03:24:00 +03:00
5 changed files with 8 additions and 9 deletions

View File

@@ -1,4 +1,3 @@
#include "../token.h"
#define CURRENCY_NAME "Night Coin"
#define COMMAND_BALANCE_DESCRIPTION "See someone's balance of " CURRENCY_NAME
@@ -20,8 +19,8 @@
#define COMMAND_PRINT_DESCRIPTION "Allows the admin to print money on-demand"
#define COMMAND_PRINT_ARGS_AMOUNT_DESCRIPTION "How much are we printing boss?"
#define COMMAND_PRINT_FAIL_NO_PRIVILIEGE \
"Only <@!" + std::to_string(ADMIN_ID) + "> can print money!"
#define COMMAND_PRINT_SUCCESS(amount) \
#define COMMAND_PRINT_FAIL_NO_PRIVILIEGE(recipient) \
"Only <@!" + recipient + "> can print money!"
#define COMMAND_PRINT_SUCCESS(recipient, amount) \
"Successfully printed " + amount + " " CURRENCY_NAME "(s) to <@!" + \
std::to_string(ADMIN_ID) + "> !"
recipient + "> !"

View File

@@ -1,5 +1,4 @@
#include "../../languages/locale_en.hpp"
#include "../../token.h"
#include "../Commands.hpp"
#include "../Databases.hpp"

View File

@@ -46,12 +46,13 @@ void commandPrintMoney(const dpp::slashcommand_t &event) {
std::int64_t userid = event.command.get_issuing_user().id;
if (ADMIN_ID != userid) {
event.reply(COMMAND_PRINT_FAIL_NO_PRIVILIEGE);
event.reply(COMMAND_PRINT_FAIL_NO_PRIVILIEGE(std::to_string(ADMIN_ID)));
return;
}
std::uint64_t amount = std::get<std::int64_t>(event.get_parameter("amount"));
increaseFromUsersBalance(ADMIN_ID, amount);
event.reply(COMMAND_PRINT_SUCCESS(std::to_string(amount)));
event.reply(
COMMAND_PRINT_SUCCESS(std::to_string(ADMIN_ID), std::to_string(amount)));
}
///

View File

@@ -1,5 +1,5 @@
#include "../languages/locale_en.hpp"
#include "../token.h"
#include "../settings.hpp"
#include <dpp/cluster.h>
#include <dpp/dispatcher.h>
#include <dpp/snowflake.h>