Exemple #1
0
        public async Task DurationRmd(SocketGuildUser bot, [Remainder] ChronoString CS = null)
        {
            double duration = CS == null ? 0d : CS.Time.TotalSeconds;

            if (duration > 300d)
            {
                await ReplyAsync("⛔ Reminder duration must not be greater than 5 minutes!"); return;
            }
            else
            {
                await DS.ModifyReminderDuration(Context.Guild, bot, (int)duration);
                await ReplyAsync($"✅ New duration: {(int)duration} seconds. Reminder: {bot} ({bot.Id})");
            }
        }
Exemple #2
0
        public async Task AddRmd(SocketGuildUser bot, [Remainder] ChronoString CS = null)
        {
            if (!bot.IsBot)
            {
                await ReplyAsync("⛔ Reminder must be a bot!"); return;
            }
            var    G        = Context.Guild;
            double duration = CS == null ? 0d : CS.Time.TotalSeconds;

            if (duration > 300d)
            {
                await ReplyAsync("⛔ Reminder duration must not be greater than 5 minutes!"); return;
            }
            if (DS.GetReminderConfig(G, bot) == null) //If the reminder doesn't exist
            {
                await DS.AddReminder(G, bot, false, (int)duration);
                await ReplyAsync($"✅ Added new bot reminder: {bot} ({bot.Id}) with duration: {(int)duration} seconds");
            }
            else
            {
                await ReplyAsync("⛔ A reminder with the same target bot already exists on the list!");
            }
        }