Exemplo n.º 1
0
        public async Task ListUserReminders(IGuildUser user = null)
        {
            if (user == null)
            {
                user = Context.User as IGuildUser;
            }


            // match all by AuthorId in this guild
            var userReminders = _reminderService.GetReminderAuthor(user.Id, Context.Guild.Id);

            var builder = new EmbedBuilder();

            builder.WithAuthor(Context.Client.CurrentUser);
            builder.WithColor(new Color(255, 204, 77));

            builder.WithTitle(string.Format("Reminders for {0}:", user.Nickname ?? user.Username));

            foreach (Reminder x in userReminders)
            {
                string descriptionText = string.Format("`#{0}` {1}", x.ID, x.ReminderText);

                builder.AddField(x.ReminderTime.ToString("g"), descriptionText, true);
            }
            await ReplyAsync("", false, builder.Build());
        }