public DiscordBotService(IDiscordBotConfig config, IServerMonitorService monitorService, IProcessWatcherService watcherService, ICommonResources resources) { Config = config; MonitorService = monitorService; WatcherService = watcherService; Resources = resources; client = new DiscordSocketClient( ); client.Log += Log; client.MessageReceived += MessageReceivedAsync; commands = new CommandService( ); commands.Log += Log; commands.CommandExecuted += CommandExecutedAsync; embedService = new LiveEmbedService(Config, Resources); channelUpdaterService = new ChannelUpdaterService(Config, embedService); personalNotificationService = new PersonalNotificationService(Config, embedService); var container = BuildContainer( ); services = new AutofacServiceProvider(container); AddCommands( ); }
public LiveEmbedService(IDiscordBotConfig config, ICommonResources resources) { Config = config; Resources = resources; embeds = ImmutableDictionary <int, IServerEmbedInfo> .Empty; subject = new Subject <IServerEmbedInfo> ( ); }
public ServerEmbedInfo(IDiscordBotConfig config, ICommonResources resources, int port, string serverName) { Config = config; Resources = resources; Port = port; ServerName = serverName; ConnectString = $"iw4x://{Config.ExternalIP}:{Port}"; }
public ServerModule( IDiscordBotConfig config, IServerMonitorService monitorService, ILiveEmbedService embedService, IChannelUpdaterService channelUpdaterService, IPersonalNotificationService personalNotificationService, ICommonResources resources ) { Config = config; MonitorService = monitorService; EmbedService = embedService; ChannelUpdaterService = channelUpdaterService; PersonalNotificationService = personalNotificationService; Resources = resources; }