Exemplo n.º 1
0
 public void Initialize()
 {
     aliceBot.loadSettings();
     aliceBot.isAcceptingUserInput = false;
     aliceBot.loadAIMLFromFiles();
     aliceBot.isAcceptingUserInput = true;
 }
Exemplo n.º 2
0
        public async Task MainAsync()
        {
            myBot.loadSettings();


            myBot.loadAIMLFromFiles();

            _client = new DiscordSocketClient();

            _client.Log             += Log;
            _client.MessageReceived += MessageReceived;

            string token = "42"; // Remember to keep this private!
            await _client.LoginAsync(TokenType.Bot, token);

            await _client.StartAsync();

            // Block this task until the program is closed.
            await Task.Delay(-1);
        }