Beispiel #1
0
        public CatcherService(PokecordCatcher bot, string hashPath) : base(bot)
        {
            comparer = new PokemonComparer(LoadPokemon(hashPath));
            http     = new HttpClient();

            Client.MessageReceived += async x => Task.Run(async() => await OnMessage(x));
        }
        public CatcherService(PokecordCatcher bot, string hashPath) : base(bot)
        {
            comparer = new PokemonComparer(LoadPokemon(hashPath));
            http     = new HttpClient();


            Client.MessageReceived += async x => Task.Run(async() => await OnMessage(x))
                                      .ContinueWith(t => Console.WriteLine(t.Exception.Flatten().InnerException), TaskContinuationOptions.OnlyOnFaulted);
        }
        public CatcherService(PokecordCatcher bot, string hashPath) : base(bot)
        {
            var pokemon = LoadPokemon(hashPath);

            comparer = new PokemonComparer(pokemon);
            Console.WriteLine("Loaded " + pokemon.Select(x => x.Value.Count).Sum() + " pokemon");
            http = new HttpClient();

            Client.MessageReceived += async x => Task.Run(async() => await OnMessage(x))
                                      .ContinueWith(t => Console.WriteLine(t.Exception.Flatten().InnerException), TaskContinuationOptions.OnlyOnFaulted);
        }
Beispiel #4
0
        public CommandService(PokecordCatcher bot) : base(bot)
        {
            commandMethods = FindCommandMethods();

            Client.MessageReceived += OnMessage;
        }
 public SpammerService(PokecordCatcher bot) : base(bot)
 {
     spammerThread = new Thread(DoSpam);
     spammerThread.Start();
 }
Beispiel #6
0
        public CommandService(PokecordCatcher bot) : base(bot)
        {
            commandMethods = FindCommandMethods();

            Client.MessageReceived += async x => Task.Run(async() => await OnMessage(x));
        }