public async Task InitializeAsync() { socketClient.MessageReceived += HandleMessageReceivedAsync; await logger.Log( new Discord.LogMessage( Discord.LogSeverity.Info, "Gpt2MessagingService", "Ready!")); }
public async Task InitializeAsync() { await commandService.AddModuleAsync <GuildConfigurationModule>(services); await commandService.AddModuleAsync <GPT2ChatConfigModule>(services); await logger.Log(new LogMessage( LogSeverity.Info, "CommadHandler", $"Available commands: {string.Join(", ", commandService.Commands.Select((commandInfo) => commandInfo.Name))}" )); client.MessageReceived += HandleCommandAsync; }
public ServerConfigService(IServiceProvider serviceProvider, DiscordSocketClient socketClient, LoggerService logger) { this.serviceProvider = serviceProvider; this.socketClient = socketClient; this.logger = logger; logger.Log(new LogMessage(LogSeverity.Info, "ServerConfigService", "Service up and running!")); serverConfigDictionary = new Dictionary <ulong, ServerConfig>(); socketClient.GuildAvailable += OnGuildAvailable; socketClient.JoinedGuild += OnGuildJoined; }