Example #1
0
            public async Task Remind(MeOrHere meorhere, string timeStr, [Remainder] string message)
            {
                ulong target;

                target = meorhere == MeOrHere.Me ? Context.User.Id : Context.Channel.Id;
                await RemindInternal(target, meorhere == MeOrHere.Me, timeStr, message).ConfigureAwait(false);
            }
            public async Task Remind(MeOrHere meorhere, StoopidTime time, [Remainder] string message)
            {
                ulong target;

                target = meorhere == MeOrHere.Me ? Context.User.Id : Context.Channel.Id;
                if (!await RemindInternal(target, meorhere == MeOrHere.Me || Context.Guild == null, time.Time, message).ConfigureAwait(false))
                {
                    await ReplyErrorLocalizedAsync("remind_too_long").ConfigureAwait(false);
                }
            }
Example #3
0
            public async Task Remind(MeOrHere meorhere, string timeStr, [Remainder] string message)
            {
                IMessageChannel target;

                if (meorhere == MeOrHere.Me)
                {
                    target = await((IGuildUser)Context.User).CreateDMChannelAsync().ConfigureAwait(false);
                }
                else
                {
                    target = Context.Channel;
                }
                await Remind(target, timeStr, message).ConfigureAwait(false);
            }
Example #4
0
            public async Task Remind(IUserMessage umsg, MeOrHere meorhere, string timeStr, [Remainder] string message)
            {
                var channel = (ITextChannel)umsg.Channel;

                IMessageChannel target;

                if (meorhere == MeOrHere.Me)
                {
                    target = await((IGuildUser)umsg.Author).CreateDMChannelAsync().ConfigureAwait(false);
                }
                else
                {
                    target = channel;
                }
                await Remind(umsg, target, timeStr, message).ConfigureAwait(false);
            }
Example #5
0
            public async Task Remind(MeOrHere meorhere, [Leftover] string remindString)
            {
                if (!_service.TryParseRemindMessage(remindString, out var remindData))
                {
                    await ReplyErrorLocalizedAsync("remind_invalid");

                    return;
                }

                ulong target;

                target = meorhere == MeOrHere.Me ? ctx.User.Id : ctx.Channel.Id;
                if (!await RemindInternal(target, meorhere == MeOrHere.Me || ctx.Guild == null, remindData.Time, remindData.What)
                    .ConfigureAwait(false))
                {
                    await ReplyErrorLocalizedAsync("remind_too_long").ConfigureAwait(false);
                }
            }
Example #6
0
            public async Task Remind(IUserMessage umsg, MeOrHere meorhere, string timeStr, [Remainder] string message)
            {
                var channel = (ITextChannel)umsg.Channel;

                IMessageChannel target;
                if (meorhere == MeOrHere.Me)
                {
                    target = await ((IGuildUser)umsg.Author).CreateDMChannelAsync().ConfigureAwait(false);
                }
                else
                {
                    target = channel;
                }
                await Remind(umsg, target, timeStr, message).ConfigureAwait(false);
            }