Esempio n. 1
0
        public Reminder AddReminder(ulong guildId, ulong channelID,
                                    ulong authorId, string text, DateTime time,
                                    ReminderType type = ReminderType.Default)
        {
            Reminder r = new Reminder()
            {
                GuildId       = guildId,
                TextChannelId = channelID,
                AuthorId      = authorId,
                ReminderText  = text,
                ReminderTime  = time,
                ReminderType  = type
            };

            r.SetDefaultTimeSpans();
            // remove the expired ones so we aren't spammed when the reminder is made
            r.CheckExpiredTimeSpan();

            m_database.GetCollection <Reminder>("Reminders")
            .Insert(r);

            return(r);
        }