Disabled >pick, >plant and >cleverbot

This commit is contained in:
Kwoth 2017-01-02 23:38:10 +01:00
parent 5d12e48f44
commit adb1e570dd
2 changed files with 61 additions and 60 deletions

View File

@ -46,9 +46,9 @@ 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())
{ {
var conf = uow.BotConfig.GetOrCreate(); var conf = uow.BotConfig.GetOrCreate();
@ -101,7 +101,7 @@ namespace NadekoBot.Modules.Games
} }
catch { } catch { }
} }
#if !GLOBAL_NADEKO
[NadekoCommand, Usage, Description, Aliases] [NadekoCommand, Usage, Description, Aliases]
[RequireContext(ContextType.Guild)] [RequireContext(ContextType.Guild)]
public async Task Pick() public async Task Pick()
@ -159,7 +159,7 @@ namespace NadekoBot.Modules.Games
} }
plantedFlowers.AddOrUpdate(Context.Channel.Id, new List<IUserMessage>() { msg }, (id, old) => { old.Add(msg); return old; }); plantedFlowers.AddOrUpdate(Context.Channel.Id, new List<IUserMessage>() { msg }, (id, old) => { old.Add(msg); return old; });
} }
#endif
[NadekoCommand, Usage, Description, Aliases] [NadekoCommand, Usage, Description, Aliases]
[RequireContext(ContextType.Guild)] [RequireContext(ContextType.Guild)]
[RequireUserPermission(GuildPermission.ManageMessages)] [RequireUserPermission(GuildPermission.ManageMessages)]

View File

@ -123,7 +123,7 @@ namespace NadekoBot.Services
{ {
return; return;
} }
#if !GLOBAL_NADEKO
try try
{ {
var cleverbotExecuted = await Games.CleverBotCommands.TryAsk(usrMsg); var cleverbotExecuted = await Games.CleverBotCommands.TryAsk(usrMsg);
@ -133,6 +133,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