switched from stoi to stoll
This commit is contained in:
@@ -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