public async Task Wealth() { var configs = await UserConfig.GetAll(); var filtered = configs .Where(x => x.Wumpoints.ContainsKey(Context.Guild.Id)) .OrderByDescending(x => x.Wumpoints[Context.Guild.Id]) .Take(11); await ReplyAsync($"Showing top 10 wealthiest people\n\n" + string.Join("\n", filtered.Select(x => $"{Format.Bold(Context.Guild.GetUser(x.UID)?.Username ?? "Not found")} with `{x.Wumpoints[Context.Guild.Id]}` wumpoints"))); }
public async Task Gift(double points) { var guild = Context.Guild; var configs = await UserConfig.GetAll(); uint givePoints = points > uint.MaxValue ? uint.MaxValue : (uint)points; foreach (var config in configs) { config.GivePoints(Context.Guild.Id, givePoints); } await ReplyAsync($"Gifted {points} wumpoints to {configs.Count} users."); }