From 81d2272a9a5f24b8d0c46c60be3fa9d2a4d446a2 Mon Sep 17 00:00:00 2001 From: Kwoth Date: Mon, 10 Apr 2017 03:00:17 +0200 Subject: [PATCH] fixed missing here and everyone mention removals from custom reactions, repeaters and others --- src/NadekoBot/Modules/CustomReactions/CustomReactions.cs | 2 +- src/NadekoBot/Modules/CustomReactions/Extensions.cs | 2 +- src/NadekoBot/Modules/Utility/Commands/MessageRepeater.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/NadekoBot/Modules/CustomReactions/CustomReactions.cs b/src/NadekoBot/Modules/CustomReactions/CustomReactions.cs index ac6fd4c9..b250c510 100644 --- a/src/NadekoBot/Modules/CustomReactions/CustomReactions.cs +++ b/src/NadekoBot/Modules/CustomReactions/CustomReactions.cs @@ -28,7 +28,7 @@ namespace NadekoBot.Modules.CustomReactions { return await channel.EmbedAsync(crembed.ToEmbed(), crembed.PlainText ?? ""); } - return await channel.SendMessageAsync(cr.ResponseWithContext(context)); + return await channel.SendMessageAsync(cr.ResponseWithContext(context).SanitizeMentions()); } } diff --git a/src/NadekoBot/Modules/CustomReactions/Extensions.cs b/src/NadekoBot/Modules/CustomReactions/Extensions.cs index a0b91962..b40e3fa8 100644 --- a/src/NadekoBot/Modules/CustomReactions/Extensions.cs +++ b/src/NadekoBot/Modules/CustomReactions/Extensions.cs @@ -15,7 +15,7 @@ namespace NadekoBot.Modules.CustomReactions { public static Dictionary> responsePlaceholders = new Dictionary>() { - {"%target%", (ctx, trigger) => { return ctx.Content.Substring(trigger.Length).Trim(); } } + {"%target%", (ctx, trigger) => { return ctx.Content.Substring(trigger.Length).Trim().SanitizeMentions(); } } }; public static Dictionary> placeholders = new Dictionary>() diff --git a/src/NadekoBot/Modules/Utility/Commands/MessageRepeater.cs b/src/NadekoBot/Modules/Utility/Commands/MessageRepeater.cs index 4bc2f2f5..4b05391d 100644 --- a/src/NadekoBot/Modules/Utility/Commands/MessageRepeater.cs +++ b/src/NadekoBot/Modules/Utility/Commands/MessageRepeater.cs @@ -89,7 +89,7 @@ namespace NadekoBot.Modules.Utility Channel = Guild.GetTextChannel(Repeater.ChannelId); 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) {