large refactor: reorganize code

This commit is contained in:
2024-10-11 20:33:12 -04:00
parent ecbf4cad06
commit 4e08e25575
10 changed files with 240 additions and 183 deletions

View File

@@ -0,0 +1,14 @@
use std::collections::HashMap;
use poise::serenity_prelude::UserId;
pub mod balance;
pub mod give;
pub mod wager;
pub(self) fn get_user_wealth_mut(users: &mut HashMap<UserId, usize>, id: UserId) -> &mut usize {
if users.get(&id).is_none() {
users.insert(id, 100);
}
users.get_mut(&id).unwrap()
}