forked from adam/discord-bot-shtik
fix regex to remove mentions
This commit is contained in:
parent
fcf7d11715
commit
53c1d956b3
@ -79,11 +79,10 @@ namespace silverworker_discord
|
|||||||
{
|
{
|
||||||
if(message.Author.Id == 159985870458322944) //MEE6
|
if(message.Author.Id == 159985870458322944) //MEE6
|
||||||
{
|
{
|
||||||
var contentWithoutMnetion = Regex.Replace(message.Content, "<[^>]*>", "");
|
if(message.Content?.Contains("you just advanced") == true)
|
||||||
if(contentWithoutMnetion.Contains("you just advanced"))
|
|
||||||
{
|
{
|
||||||
var newText = Regex.Replace(message.Content, "<[^>]*>", message.Author.Username);
|
var newText = Regex.Replace(message.Content, "<[^>]*>", message.Author.Username);
|
||||||
newText = Regex.Replace(message.Content, "level [\\d]+", "level -1");
|
newText = Regex.Replace(newText, "level [\\d]+", "level -1");
|
||||||
Features.mock(newText, message);
|
Features.mock(newText, message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user