Esempio n. 1
0
        private async void CheckForReminders(object sender, ElapsedEventArgs e)
        {
            var reminders = _reminderRepository.CheckForReminders();

            foreach (var reminder in reminders)
            {
                var channel = _client.GetChannel(reminder.ChannelID) as IMessageChannel;
                await channel.SendMessageAsync($"{MentionUtils.MentionUser(reminder.AuthorID)} you wanted to be reminded of : \"{reminder.ReminderText}\"");

                _reminderRepository.SetReminderDone(reminder.ReminderID);
            }
        }