Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions DiscordBot/Modules/ReminderModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,15 @@ public class ReminderModule : ModuleBase
[Summary("Reminds users of a message based on time. Syntax : !remindme 1hour30min Watch a tutorial")]
public async Task RemindMe(string time, [Remainder] string message)
{
if (Context.Message.MentionedEveryone || Context.Message.MentionedRoleIds.Count > 0 ||
Context.Message.MentionedUserIds.Count > 0)
if (Context.Message.MentionedEveryone || Context.Message.MentionedRoleIds.Count > 0)
{
await ReplyAsync("You can't mention anyone or roles in a reminder.").DeleteAfterSeconds(seconds: 5);
await ReplyAsync("You can't mention groups or roles in a reminder.").DeleteAfterSeconds(seconds: 5);
return;
}

if (Context.Message.MentionedUserIds.Count > 0)
{
await ReplyAsync($"You can't mention anyone or roles in a reminder.\n\"{message.ToString()}\"").DeleteAfterSeconds(seconds: 15);
return;
}

Expand Down Expand Up @@ -177,4 +182,4 @@ public async Task RebootReminderService()
}

#endregion
}
}
Loading