Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            Console.WriteLine("Initializing Bot...");
            bot = new TelegramBot(System.IO.File.ReadAllText("apikey.txt"));

            Console.WriteLine("Bot initialized.");
            Console.WriteLine("Hi, i'm {0}! ID: {1}", bot.Me.FirstName, bot.Me.Id);

            new Task(PollMessages).Start();

            Console.ReadLine();
        }
Ejemplo n.º 2
0
        static void Main()
        {
            _bot = new TelegramBot(File.ReadAllText("apikey.txt"));
            _engine = new RantEngine();
            _engine.LoadPackage("Rantionary.rantpkg");
            
            Console.WriteLine("Rant Loaded! {0} dictionaries.", _engine.Dictionary.GetTables().Count());

            historyDictionary = new Dictionary<string, RantPattern>();

            new Task(HandleMessages).Start();

            Console.WriteLine("Press enter to quit.");
            Console.ReadLine();
        }
Ejemplo n.º 3
0
        static void Main(string[] args)
        {
            Console.WriteLine("Initializing Bot...");
            bot = new TelegramBot(File.ReadAllText("apikey.txt"));
            Console.WriteLine("Bot initialized.");

            Console.WriteLine("Initializing Hunspell...");
            hunspell = new Hunspell("en_us.aff", "en_us.dic");
            Console.WriteLine("Hunspell initialized. {0} words.", File.ReadAllLines("en_us.dic").Count());

            Console.WriteLine("Connecting to SQLite Database...");
            database = new DatabaseContext();
            Console.WriteLine("Database connected. {0} words.", database.GetWordCount());

            Console.WriteLine("Hi, i'm {0}! ID: {1}", bot.Me.FirstName, bot.Me.Id);

            new Task(PollMessages).Start();

            Console.ReadLine();
        }