diff --git a/src/NadekoBot/Modules/Utility/Commands/Remind.cs b/src/NadekoBot/Modules/Utility/Commands/Remind.cs index 8da05b89..4ffd9469 100644 --- a/src/NadekoBot/Modules/Utility/Commands/Remind.cs +++ b/src/NadekoBot/Modules/Utility/Commands/Remind.cs @@ -123,8 +123,19 @@ namespace NadekoBot.Modules.Utility [RequireContext(ContextType.Guild)] [RequireUserPermission(GuildPermission.ManageMessages)] [Priority(0)] - public Task Remind(ITextChannel channel, string timeStr, [Remainder] string message) => - RemindInternal(channel.Id, false, timeStr, message); + public async Task Remind(ITextChannel channel, string timeStr, [Remainder] string message) + { + var perms = ((IGuildUser)Context.User).GetPermissions((ITextChannel)channel); + if (!perms.SendMessages || !perms.ReadMessages) + { + await ReplyErrorLocalized("cant_read_or_send").ConfigureAwait(false); + return; + } + else + { + var _ = RemindInternal(channel.Id, false, timeStr, message).ConfigureAwait(false); + } + } public async Task RemindInternal(ulong targetId, bool isPrivate, string timeStr, [Remainder] string message) { diff --git a/src/NadekoBot/Resources/ResponseStrings.resx b/src/NadekoBot/Resources/ResponseStrings.resx index 1fb27df8..ccb11a5e 100644 --- a/src/NadekoBot/Resources/ResponseStrings.resx +++ b/src/NadekoBot/Resources/ResponseStrings.resx @@ -2105,6 +2105,9 @@ Owner ID: {2} I will remind {0} to {1} in {2} `({3:d.M.yyyy.} at {4:HH:mm})` + + You can't read from or send messages to that channel. + Not a valid time format. Check the commandlist.