コード例 #1
0
ファイル: Alice.cs プロジェクト: klai1994/Discord-Bot
 public void Initialize()
 {
     aliceBot.loadSettings();
     aliceBot.isAcceptingUserInput = false;
     aliceBot.loadAIMLFromFiles();
     aliceBot.isAcceptingUserInput = true;
 }
コード例 #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);
        }