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.

logging.cs 522 B

12345678910111213141516171819
  1. using Discord;
  2. public class Program
  3. {
  4. // Note: This is the light client, it only supports REST calls.
  5. private DiscordClient _client;
  6. static void Main(string[] args) => new Program().Start().GetAwaiter().GetResult();
  7. public async Task Start()
  8. {
  9. _client = new DiscordClient(new DiscordConfig() {
  10. LogLevel = LogSeverity.Info
  11. });
  12. _client.Log += (message) => Console.WriteLine($"{message.ToString()}");
  13. await _client.LoginAsync(TokenType.Bot, "bot token");
  14. }
  15. }