public void start() { //Register listener var listener = new Listen(); ActionUtil.AddListener(listener); }
public void Initialize(TimedTask timer) { Logger.Info("Plugin version is " + PluginVersion); Config.Instance.Initialize(); TimerUtil.Instance.RestartTimers(); Status = "EcoLiveDataExporter fully initialized!"; ActionUtil.AddListener(this); }
public void Initialize(TimedTask timer) { DiscordSocketClient blatherDiscord = new DiscordSocketClient(); DiscordSocketClient isabelleDiscord = new DiscordSocketClient(); using (var services = ConfigureServices()) { services.GetRequiredService <IdentityManager>().Initialize(); services.GetRequiredService <CommandHandlingService>().InitializeAsync(isabelleDiscord).Wait(); services.GetRequiredService <Blathers>().InitializeAsync(blatherDiscord).Wait(); services.GetRequiredService <Isabelle>().InitializeAsync(isabelleDiscord).Wait(); PublicModule.Initialize(services); EcoCommands.Initialize(services); var relay = new ChatRelay(services); ActionUtil.AddListener(relay); } Log.WriteLine(Localizer.Do($"Crossing is initialized!")); ChatManager.ServerMessageToAllLoc($"Crossing is initialized! Version 0.1", DefaultChatTags.General); }
private void BeginRelaying() { ActionUtil.AddListener(this); DiscordClient.MessageCreated += OnDiscordMessageCreateEvent; }