You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

client.cs 355 B

12345678910111213141516
  1. // Program.cs
  2. using Discord.WebSocket;
  3. // ...
  4. public async Task MainAsync()
  5. {
  6. var client = new DiscordSocketClient();
  7. client.Log += Log;
  8. string token = "abcdefg..."; // Remember to keep this private!
  9. await client.LoginAsync(TokenType.Bot, token);
  10. await client.StartAsync();
  11. // Block this task until the program is closed.
  12. await Task.Delay(-1);
  13. }