switched from stoi to stoll

This commit is contained in:
2025-07-19 20:08:03 +03:00
parent 06d5843be7
commit 836d257a17
2 changed files with 3 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
// Bot info // Bot info
#define BOT_NAME "The Bartender Bot" #define BOT_NAME "The Bartender Bot"
#define BOT_VERSION "v0.2-1" #define BOT_VERSION "v0.2-2"
#define CURRENCY_NAME "Night Coin" #define CURRENCY_NAME "Night Coin"

View File

@@ -116,14 +116,14 @@ void commandMoneyLeaderboard(const dpp::slashcommand_t &event) {
inline void increaseFromUsersBalance(const dpp::snowflake userid, inline void increaseFromUsersBalance(const dpp::snowflake userid,
std::uint64_t amount) { std::uint64_t amount) {
std::uint64_t balance = std::stoi(getUserBalance(userid)); std::uint64_t balance = std::stoll(getUserBalance(userid));
execSQL("UPDATE MONEY SET CASH=" + std::to_string(balance + amount) + execSQL("UPDATE MONEY SET CASH=" + std::to_string(balance + amount) +
" WHERE UID=" + userid.str()); " WHERE UID=" + userid.str());
} }
inline bool deductFromUsersBalance(const dpp::snowflake userid, inline bool deductFromUsersBalance(const dpp::snowflake userid,
std::uint64_t amount) { std::uint64_t amount) {
std::uint64_t balance = std::stoi(getUserBalance(userid)); std::uint64_t balance = std::stoll(getUserBalance(userid));
if (balance < amount) { if (balance < amount) {
return false; return false;
} }