diff --git a/languages/locale_en.hpp b/languages/locale_en.hpp index 0222e94..3d0a5a9 100644 --- a/languages/locale_en.hpp +++ b/languages/locale_en.hpp @@ -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 + "> !" diff --git a/src/Base/Entry.cpp b/src/Base/Entry.cpp index 35ee60c..abb666d 100644 --- a/src/Base/Entry.cpp +++ b/src/Base/Entry.cpp @@ -1,5 +1,4 @@ #include "../../languages/locale_en.hpp" -#include "../../token.h" #include "../Commands.hpp" #include "../Databases.hpp" diff --git a/src/CommandEvents.cpp b/src/CommandEvents.cpp index 02ec470..74549bf 100644 --- a/src/CommandEvents.cpp +++ b/src/CommandEvents.cpp @@ -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(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))); } /// diff --git a/src/Commands.hpp b/src/Commands.hpp index 69b3e8e..cd56b7a 100644 --- a/src/Commands.hpp +++ b/src/Commands.hpp @@ -1,5 +1,5 @@ #include "../languages/locale_en.hpp" -#include "../token.h" +#include "../settings.hpp" #include #include #include