Esempio n. 1
0
        public void start()
        {
            //Register listener
            var listener = new Listen();

            ActionUtil.AddListener(listener);
        }
Esempio n. 2
0
 public void Initialize(TimedTask timer)
 {
     Logger.Info("Plugin version is " + PluginVersion);
     Config.Instance.Initialize();
     TimerUtil.Instance.RestartTimers();
     Status = "EcoLiveDataExporter fully initialized!";
     ActionUtil.AddListener(this);
 }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
 private void BeginRelaying()
 {
     ActionUtil.AddListener(this);
     DiscordClient.MessageCreated += OnDiscordMessageCreateEvent;
 }