feat: Added /quest delete command

- Also fixed formatting and sorting in /scoreboard
This commit is contained in:
Alexey 2025-12-11 17:27:19 +03:00
commit 38e3f149b1
2 changed files with 68 additions and 26 deletions

View file

@ -6,7 +6,7 @@ use crate::{Context, Error};
fn account_balance_string(account: &Account, map: &Map) -> String {
let rooms_value = account_rooms_value(account, map);
let full_balance = account_full_balance(account, map);
format!("{account}: **{full_balance}** points (**{balance}** on balance \
format!("\n{account}: **{full_balance}** points (**{balance}** on balance \
+ **{rooms_value}** unlocked rooms networth)",
account = account_user_id(&account).mention(),
balance = account.balance,
@ -48,12 +48,12 @@ pub async fn scoreboard(
accounts.sort_by(|a,b| {
let a_balance = account_full_balance(a, &map);
let b_balance = account_full_balance(b, &map);
a_balance.cmp(&b_balance)
b_balance.cmp(&a_balance)
});
let this_user = ctx.author().id;
let mut reply_string = String::new();
let mut reply_string = "Current scoreboard:".to_string();
for account in accounts {
let user_id = account_user_id(&account);