switched from stoi to stoll
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
// Bot info
|
||||
#define BOT_NAME "The Bartender Bot"
|
||||
#define BOT_VERSION "v0.2-1"
|
||||
#define BOT_VERSION "v0.2-2"
|
||||
|
||||
#define CURRENCY_NAME "Night Coin"
|
||||
|
||||
|
@@ -116,14 +116,14 @@ void commandMoneyLeaderboard(const dpp::slashcommand_t &event) {
|
||||
|
||||
inline void increaseFromUsersBalance(const dpp::snowflake userid,
|
||||
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) +
|
||||
" WHERE UID=" + userid.str());
|
||||
}
|
||||
|
||||
inline bool deductFromUsersBalance(const dpp::snowflake userid,
|
||||
std::uint64_t amount) {
|
||||
std::uint64_t balance = std::stoi(getUserBalance(userid));
|
||||
std::uint64_t balance = std::stoll(getUserBalance(userid));
|
||||
if (balance < amount) {
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user