From 96ede41e52c3bb222a6daf0d1b258123939184d5 Mon Sep 17 00:00:00 2001 From: Kwoth Date: Tue, 3 Jan 2017 18:48:06 +0100 Subject: [PATCH] Disabled cleverot and flower generation on public bot --- src/NadekoBot/Modules/Games/Commands/CleverBotCommands.cs | 3 ++- src/NadekoBot/Modules/Games/Commands/PlantAndPickCommands.cs | 3 +++ src/NadekoBot/Services/CommandHandler.cs | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/NadekoBot/Modules/Games/Commands/CleverBotCommands.cs b/src/NadekoBot/Modules/Games/Commands/CleverBotCommands.cs index 9ec59147..a65787fb 100644 --- a/src/NadekoBot/Modules/Games/Commands/CleverBotCommands.cs +++ b/src/NadekoBot/Modules/Games/Commands/CleverBotCommands.cs @@ -88,7 +88,7 @@ namespace NadekoBot.Modules.Games } return true; } - +#if !GLOBAL_NADEKO [NadekoCommand, Usage, Description, Aliases] [RequireContext(ContextType.Guild)] [RequireUserPermission(ChannelPermission.ManageMessages)] @@ -120,6 +120,7 @@ namespace NadekoBot.Modules.Games await Context.Channel.SendConfirmAsync($"{Context.User.Mention} Enabled cleverbot on this server.").ConfigureAwait(false); } +#endif } } } \ No newline at end of file diff --git a/src/NadekoBot/Modules/Games/Commands/PlantAndPickCommands.cs b/src/NadekoBot/Modules/Games/Commands/PlantAndPickCommands.cs index d7fb96cc..6841c089 100644 --- a/src/NadekoBot/Modules/Games/Commands/PlantAndPickCommands.cs +++ b/src/NadekoBot/Modules/Games/Commands/PlantAndPickCommands.cs @@ -47,7 +47,10 @@ namespace NadekoBot.Modules.Games _log = LogManager.GetCurrentClassLogger(); var sw = Stopwatch.StartNew(); + +#if !GLOBAL_NADEKO NadekoBot.Client.MessageReceived += PotentialFlowerGeneration; +#endif using (var uow = DbHandler.UnitOfWork()) { diff --git a/src/NadekoBot/Services/CommandHandler.cs b/src/NadekoBot/Services/CommandHandler.cs index 47c7e770..9c899d8c 100644 --- a/src/NadekoBot/Services/CommandHandler.cs +++ b/src/NadekoBot/Services/CommandHandler.cs @@ -124,10 +124,10 @@ namespace NadekoBot.Services return; } +#if !GLOBAL_NADEKO try { var cleverbotExecuted = await Games.CleverBotCommands.TryAsk(usrMsg); - if (cleverbotExecuted) { _log.Info($@"CleverBot Executed @@ -139,6 +139,7 @@ namespace NadekoBot.Services } } catch (Exception ex) { _log.Warn(ex, "Error in cleverbot"); } +#endif try { // maybe this message is a custom reaction