예제 #1
0
        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());
            }
        }
예제 #2
0
        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}");
            }
        }