Cleverbot reenabled
This commit is contained in:
		@@ -46,9 +46,9 @@ namespace NadekoBot.Modules.Games
 | 
			
		||||
            {
 | 
			
		||||
                _log = LogManager.GetCurrentClassLogger();
 | 
			
		||||
                var sw = Stopwatch.StartNew();
 | 
			
		||||
#if !GLOBAL_NADEKO
 | 
			
		||||
 | 
			
		||||
                NadekoBot.Client.MessageReceived += PotentialFlowerGeneration;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
                using (var uow = DbHandler.UnitOfWork())
 | 
			
		||||
                {
 | 
			
		||||
                    var conf = uow.BotConfig.GetOrCreate();
 | 
			
		||||
@@ -101,7 +101,7 @@ namespace NadekoBot.Modules.Games
 | 
			
		||||
                }
 | 
			
		||||
                catch { }
 | 
			
		||||
            }
 | 
			
		||||
#if !GLOBAL_NADEKO
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            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; });
 | 
			
		||||
            }
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [RequireUserPermission(GuildPermission.ManageMessages)]
 | 
			
		||||
 
 | 
			
		||||
@@ -200,9 +200,7 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
                    .AddField(efb => efb.WithName(Format.Bold("Owner ID(s)")).WithValue(stats.OwnerIds).WithIsInline(true))
 | 
			
		||||
                    .AddField(efb => efb.WithName(Format.Bold("Uptime")).WithValue(stats.GetUptimeString("\n")).WithIsInline(true))
 | 
			
		||||
                    .AddField(efb => efb.WithName(Format.Bold("Presence")).WithValue($"{NadekoBot.Client.GetGuilds().Count} Servers\n{stats.TextChannels} Text Channels\n{stats.VoiceChannels} Voice Channels").WithIsInline(true))
 | 
			
		||||
#if !GLOBAL_NADEKO
 | 
			
		||||
                    .WithFooter(efb => efb.WithText($"Playing {Music.Music.MusicPlayers.Where(mp => mp.Value.CurrentSong != null).Count()} songs, {Music.Music.MusicPlayers.Sum(mp => mp.Value.Playlist.Count)} queued."))
 | 
			
		||||
#endif
 | 
			
		||||
                    );
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -123,17 +123,22 @@ namespace NadekoBot.Services
 | 
			
		||||
                {
 | 
			
		||||
                    return;
 | 
			
		||||
                }
 | 
			
		||||
#if !GLOBAL_NADEKO
 | 
			
		||||
 | 
			
		||||
                try
 | 
			
		||||
                {
 | 
			
		||||
                    var cleverbotExecuted = await Games.CleverBotCommands.TryAsk(usrMsg);
 | 
			
		||||
 | 
			
		||||
                    if (cleverbotExecuted)
 | 
			
		||||
                    {
 | 
			
		||||
                        _log.Info($@"CleverBot Executed
 | 
			
		||||
        Server: {guild.Name} [{guild.Id}]
 | 
			
		||||
        Channel: {usrMsg.Channel?.Name} [{usrMsg.Channel?.Id}]
 | 
			
		||||
        UserId: {usrMsg.Author} [{usrMsg.Author.Id}]
 | 
			
		||||
        Message: {usrMsg.Content}");
 | 
			
		||||
                        return;
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
                catch (Exception ex) { _log.Warn(ex, "Error in cleverbot"); }
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
                try
 | 
			
		||||
                {
 | 
			
		||||
                    // maybe this message is a custom reaction
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user