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 542 B

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