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}");
|
||||
}
|
||||
}
|
||||
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)
|
||||
{
|
||||
|
@ -107,7 +107,7 @@ namespace silverworker_discord
|
||||
var mentionedMe = false;
|
||||
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 = contentWithoutMention.Replace(mentionOfMe, null);
|
||||
mentionedMe = true;
|
||||
@ -209,7 +209,7 @@ namespace silverworker_discord
|
||||
}
|
||||
if (msgText.Contains("!freedomunits "))
|
||||
{
|
||||
Features.Convert(message);
|
||||
Features.Convert(message, contentWithoutMention);
|
||||
didThing = true;
|
||||
}
|
||||
if (Regex.IsMatch(msgText, "!joke\\b"))
|
||||
|
Reference in New Issue
Block a user