Exemple #1
0
        private void AddRecurringJob(Reminder reminder)
        {
            string id = GetUniqueId(reminder);

            _schedulingService.ScheduleJobRecurring(id, reminder.CronExpression, async() => await RemindAsync(reminder.Message, reminder.GuildId, reminder.ChannelId));
        }
Exemple #2
0
 // The reminder's name must be unique on a per guild basis
 private static string GetUniqueId(Reminder reminder) => $"{reminder.Name}-{reminder.GuildId}";