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.

DummyModule.cs 958 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. using Discord.Commands;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace Discord.Net.Commands.Tests
  7. {
  8. [Group("debug")]
  9. class DummyModule : ModuleBase
  10. {
  11. [Command("ping")]
  12. public Task TestCommandAsync(string param)
  13. {
  14. return Task.Delay(0);
  15. }
  16. [Command("pong")]
  17. public Task AnotherCommandAsync(int param)
  18. {
  19. return Task.Delay(0);
  20. }
  21. //NOTE: do not add this to CommandNames: it is intentional for this command to not be loaded!
  22. [Command("doesNotLoad")]
  23. private Task DoesNotLoadAsync()
  24. {
  25. return Task.Delay(0);
  26. }
  27. public static IEnumerable<string> CommandNames => _commandNames;
  28. private static readonly IEnumerable<string> _commandNames = new List<string>
  29. {
  30. "debug ping",
  31. "debug pong"
  32. };
  33. }
  34. }