public async Task ListInactive() { if (Context.User.Id == 354270799684829185) { var accounts = QTCommands.ListAccounts(); var sb = new StringBuilder(); sb.Append(""); foreach (var r in accounts) { if (!string.IsNullOrEmpty(r.Key)) { if (ulong.TryParse(r.Key, out ulong userId)) { if (Context.Guild.Users.All(d => d.Id != userId) && r.Value > 0) { sb.AppendLine($"{r.Key} - {r.Value}"); } } } } await ReplyAsync(sb.ToString()); } }
public async Task ShowInactiveFunds() { if (Context.User.Id == 354270799684829185) { var accounts = QTCommands.ListAccounts(); decimal inactiveTotal = 0; foreach (var r in accounts) { if (!string.IsNullOrEmpty(r.Key)) { if (ulong.TryParse(r.Key, out ulong userId)) { if (Context.Guild.Users.All(d => d.Id != userId)) { inactiveTotal += r.Value; } } } } await ReplyAsync($"Total held by left members: {inactiveTotal:N8} {Preferences.BaseCurrency}"); } }