Skip to content

Commit

Permalink
Fixed reserved slots in signups (#61)
Browse files Browse the repository at this point in the history
After quick fix bot matches new discord's mention style.
  • Loading branch information
Smieszkokoleszko authored May 9, 2022
1 parent 4ae5ebd commit 640606f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ArmaforcesMissionBot/Modules/Signups.cs
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,10 @@ public async Task AddTeam([Remainder]string teamText)
slot.Name = match.Groups[3].Value;
foreach(var user in Context.Message.MentionedUsers)
{
slot.Name = slot.Name.Replace("<@", "<@!");
if(slot.Name.Contains(user.Mention))
{
slot.Name = slot.Name.Replace(user.Mention, "");
slot.Name = slot.Name.Replace(user.Mention, "").TrimEnd();
slot.Signed.Add(user.Id);
}
}
Expand Down

0 comments on commit 640606f

Please sign in to comment.