Compare commits
2 Commits
9a1c6bb5f9
...
05335be2f4
Author | SHA1 | Date | |
---|---|---|---|
05335be2f4 | |||
063a035b1c |
@@ -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 + "> !"
|
||||
|
@@ -1,5 +1,4 @@
|
||||
#include "../../languages/locale_en.hpp"
|
||||
#include "../../token.h"
|
||||
#include "../Commands.hpp"
|
||||
#include "../Databases.hpp"
|
||||
|
||||
|
@@ -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)));
|
||||
}
|
||||
|
||||
///
|
||||
|
@@ -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>
|
||||
|
Reference in New Issue
Block a user