Disabled cleverot and flower generation on public bot
This commit is contained in:
		@@ -88,7 +88,7 @@ namespace NadekoBot.Modules.Games
 | 
				
			|||||||
                }
 | 
					                }
 | 
				
			||||||
                return true;
 | 
					                return true;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					#if !GLOBAL_NADEKO
 | 
				
			||||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
					            [NadekoCommand, Usage, Description, Aliases]
 | 
				
			||||||
            [RequireContext(ContextType.Guild)]
 | 
					            [RequireContext(ContextType.Guild)]
 | 
				
			||||||
            [RequireUserPermission(ChannelPermission.ManageMessages)]
 | 
					            [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);
 | 
					                await Context.Channel.SendConfirmAsync($"{Context.User.Mention} Enabled cleverbot on this server.").ConfigureAwait(false);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -47,7 +47,10 @@ namespace NadekoBot.Modules.Games
 | 
				
			|||||||
                _log = LogManager.GetCurrentClassLogger();
 | 
					                _log = LogManager.GetCurrentClassLogger();
 | 
				
			||||||
                var sw = Stopwatch.StartNew();
 | 
					                var sw = Stopwatch.StartNew();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if !GLOBAL_NADEKO
 | 
				
			||||||
                NadekoBot.Client.MessageReceived += PotentialFlowerGeneration;
 | 
					                NadekoBot.Client.MessageReceived += PotentialFlowerGeneration;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                using (var uow = DbHandler.UnitOfWork())
 | 
					                using (var uow = DbHandler.UnitOfWork())
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -124,10 +124,10 @@ namespace NadekoBot.Services
 | 
				
			|||||||
                    return;
 | 
					                    return;
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if !GLOBAL_NADEKO
 | 
				
			||||||
                try
 | 
					                try
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    var cleverbotExecuted = await Games.CleverBotCommands.TryAsk(usrMsg);
 | 
					                    var cleverbotExecuted = await Games.CleverBotCommands.TryAsk(usrMsg);
 | 
				
			||||||
 | 
					 | 
				
			||||||
                    if (cleverbotExecuted)
 | 
					                    if (cleverbotExecuted)
 | 
				
			||||||
                    {
 | 
					                    {
 | 
				
			||||||
                        _log.Info($@"CleverBot Executed
 | 
					                        _log.Info($@"CleverBot Executed
 | 
				
			||||||
@@ -139,6 +139,7 @@ namespace NadekoBot.Services
 | 
				
			|||||||
                    }
 | 
					                    }
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
                catch (Exception ex) { _log.Warn(ex, "Error in cleverbot"); }
 | 
					                catch (Exception ex) { _log.Warn(ex, "Error in cleverbot"); }
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
                try
 | 
					                try
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    // maybe this message is a custom reaction
 | 
					                    // maybe this message is a custom reaction
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user