1
0
mirror of https://gitlab.com/Deukhoofd/DeukBot4.git synced 2025-09-04 16:37:19 +00:00

Fix for dad joke handler with double I'm

This commit is contained in:
Deukhoofd 2019-08-17 15:28:15 +02:00
parent 66ea585a3c
commit c2a9a27205
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE

View File

@ -9,7 +9,8 @@ namespace DeukBot4.MessageHandlers.JokeHandling
public string Id => "dad";
public string Name => "Hi I'm dad";
private readonly Regex _regex = new Regex(@"(\s|^)i(`||'| a)?m (?<word>.{3,15})$",
private readonly Regex _regex = new Regex(
@"(\s|^)i(`||'| a)?m (?<word>((?!(i(`||'| a)?m)).){3,15})$",
RegexOptions.IgnoreCase | RegexOptions.CultureInvariant);
public async Task Run(ReceivedMessage message)