Esempio n. 1
0
        public AdministrationService(NadekoBot bot, CommandHandler cmdHandler, DbService db,
                                     LogCommandService logService)
        {
            _db         = db;
            _logService = logService;

            DeleteMessagesOnCommand = new ConcurrentHashSet <ulong>(bot.AllGuildConfigs
                                                                    .Where(g => g.DeleteMessageOnCommand)
                                                                    .Select(g => g.GuildId));

            DeleteMessagesOnCommandChannels = new ConcurrentDictionary <ulong, bool>(bot.AllGuildConfigs
                                                                                     .SelectMany(x => x.DelMsgOnCmdChannels)
                                                                                     .ToDictionary(x => x.ChannelId, x => x.State)
                                                                                     .ToConcurrent());

            cmdHandler.CommandExecuted += DelMsgOnCmd_Handler;
        }
Esempio n. 2
0
 public PruneService(LogCommandService logService)
 {
     this._logService = logService;
 }