Custom reactions

This commit is contained in:
appelemac 2016-04-26 16:30:37 +02:00
parent 8a58c63bf1
commit 33bd6c07ab

View File

@ -114,6 +114,18 @@ namespace NadekoBot.Modules.Conversations
else else
await e.Channel.SendMessage("💢`No quote found.`").ConfigureAwait(false); await e.Channel.SendMessage("💢`No quote found.`").ConfigureAwait(false);
}); });
foreach (var command in NadekoBot.Config.CustomReactions)
{
var c = cgb.CreateCommand(command.Key);
c.Description($"Custom reaction.\n**Usage**:{command.Key}");
c.Do(async e =>
{
var str = command.Value;
str = str.Replace("%user%", e.User.Mention);
await e.Channel.SendMessage(str);
});
}
}); });
manager.CreateCommands(NadekoBot.BotMention, cgb => manager.CreateCommands(NadekoBot.BotMention, cgb =>