From 0d8571509ebd9ae40ba97ea1736697da28d70d15 Mon Sep 17 00:00:00 2001 From: appelemac Date: Tue, 26 Apr 2016 17:45:53 +0200 Subject: [PATCH] Added possibility of target --- NadekoBot/Modules/Conversations/Conversations.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/NadekoBot/Modules/Conversations/Conversations.cs b/NadekoBot/Modules/Conversations/Conversations.cs index 5e41612c..9a3d8462 100644 --- a/NadekoBot/Modules/Conversations/Conversations.cs +++ b/NadekoBot/Modules/Conversations/Conversations.cs @@ -119,10 +119,17 @@ namespace NadekoBot.Modules.Conversations { var c = cgb.CreateCommand(command.Key); c.Description($"Custom reaction.\n**Usage**:{command.Key}"); + c.Parameter("args", ParameterType.Unparsed); c.Do(async e => { var str = command.Value; str = str.Replace("%user%", e.User.Mention); + if (str.Contains("%target%")) + { + var args = e.GetArg("args"); + if (string.IsNullOrWhiteSpace(args)) args = string.Empty; + str = str.Replace("%target%", e.GetArg("args")); + } await e.Channel.SendMessage(str); }); }