fixed missing here and everyone mention removals from custom reactions, repeaters and others

This commit is contained in:
Kwoth 2017-04-10 03:00:17 +02:00
parent bece18dffc
commit 81d2272a9a
3 changed files with 3 additions and 3 deletions

View File

@ -28,7 +28,7 @@ namespace NadekoBot.Modules.CustomReactions
{ {
return await channel.EmbedAsync(crembed.ToEmbed(), crembed.PlainText ?? ""); return await channel.EmbedAsync(crembed.ToEmbed(), crembed.PlainText ?? "");
} }
return await channel.SendMessageAsync(cr.ResponseWithContext(context)); return await channel.SendMessageAsync(cr.ResponseWithContext(context).SanitizeMentions());
} }
} }

View File

@ -15,7 +15,7 @@ namespace NadekoBot.Modules.CustomReactions
{ {
public static Dictionary<string, Func<IUserMessage, string, string>> responsePlaceholders = new Dictionary<string, Func<IUserMessage, string, string>>() public static Dictionary<string, Func<IUserMessage, string, string>> responsePlaceholders = new Dictionary<string, Func<IUserMessage, string, string>>()
{ {
{"%target%", (ctx, trigger) => { return ctx.Content.Substring(trigger.Length).Trim(); } } {"%target%", (ctx, trigger) => { return ctx.Content.Substring(trigger.Length).Trim().SanitizeMentions(); } }
}; };
public static Dictionary<string, Func<IUserMessage, string>> placeholders = new Dictionary<string, Func<IUserMessage, string>>() public static Dictionary<string, Func<IUserMessage, string>> placeholders = new Dictionary<string, Func<IUserMessage, string>>()

View File

@ -89,7 +89,7 @@ namespace NadekoBot.Modules.Utility
Channel = Guild.GetTextChannel(Repeater.ChannelId); Channel = Guild.GetTextChannel(Repeater.ChannelId);
if (Channel != null) if (Channel != null)
oldMsg = await Channel.SendMessageAsync(toSend).ConfigureAwait(false); oldMsg = await Channel.SendMessageAsync(toSend.SanitizeMentions()).ConfigureAwait(false);
} }
catch (HttpException ex) when (ex.HttpCode == System.Net.HttpStatusCode.Forbidden) catch (HttpException ex) when (ex.HttpCode == System.Net.HttpStatusCode.Forbidden)
{ {