fix without mention becuase FUKIN DISCORD
This commit is contained in:
parent
78639f449c
commit
12e21e8ad7
@ -152,9 +152,9 @@ namespace silverworker_discord
|
|||||||
Console.Error.WriteLine($"convert failed :( qr{todaysnumber}");
|
Console.Error.WriteLine($"convert failed :( qr{todaysnumber}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public static async void Convert(SocketUserMessage message)
|
public static async void Convert(SocketUserMessage message, string contentWithoutMention)
|
||||||
{
|
{
|
||||||
await message.Channel.SendMessageAsync(Conversion.Converter.convert(message.Content));
|
await message.Channel.SendMessageAsync(Conversion.Converter.convert(contentWithoutMention));
|
||||||
}
|
}
|
||||||
public static async void Joke(SocketUserMessage message)
|
public static async void Joke(SocketUserMessage message)
|
||||||
{
|
{
|
||||||
|
@ -107,7 +107,7 @@ namespace silverworker_discord
|
|||||||
var mentionedMe = false;
|
var mentionedMe = false;
|
||||||
if (message.MentionedUsers?.FirstOrDefault(muid => muid.Id == _client.CurrentUser.Id) != null)
|
if (message.MentionedUsers?.FirstOrDefault(muid => muid.Id == _client.CurrentUser.Id) != null)
|
||||||
{
|
{
|
||||||
var mentionOfMe = "<@!" + _client.CurrentUser.Id + ">";
|
var mentionOfMe = "<@" + _client.CurrentUser.Id + ">";
|
||||||
contentWithoutMention = message.Content.Replace(mentionOfMe + " ", null);
|
contentWithoutMention = message.Content.Replace(mentionOfMe + " ", null);
|
||||||
contentWithoutMention = contentWithoutMention.Replace(mentionOfMe, null);
|
contentWithoutMention = contentWithoutMention.Replace(mentionOfMe, null);
|
||||||
mentionedMe = true;
|
mentionedMe = true;
|
||||||
@ -209,7 +209,7 @@ namespace silverworker_discord
|
|||||||
}
|
}
|
||||||
if (msgText.Contains("!freedomunits "))
|
if (msgText.Contains("!freedomunits "))
|
||||||
{
|
{
|
||||||
Features.Convert(message);
|
Features.Convert(message, contentWithoutMention);
|
||||||
didThing = true;
|
didThing = true;
|
||||||
}
|
}
|
||||||
if (Regex.IsMatch(msgText, "!joke\\b"))
|
if (Regex.IsMatch(msgText, "!joke\\b"))
|
||||||
|
Reference in New Issue
Block a user