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

12345678910111213141516171819
  1. class Program
  2. {
  3. private static DiscordBotClient _client;
  4. static void Main(string[] args)
  5. {
  6. var client = new DiscordClient(new DiscordClientConfig {
  7. //Warning: Debug mode should only be used for identifying problems. It _will_ slow your application down.
  8. LogLevel = LogMessageSeverity.Debug
  9. });
  10. client.LogMessage += (s, e) => Console.WriteLine($"[{e.Severity}] {e.Source}: {e.Message}");
  11. client.Run(async () =>
  12. {
  13. await client.Connect("discordtest@email.com", "Password123");
  14. if (!client.Servers.Any())
  15. await client.AcceptInvite("aaabbbcccdddeee");
  16. });
  17. }
  18. }