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.

command_group.cs 473 B

1234567891011121314151617181920
  1. client.CreateCommandGroup("invites", invites =>
  2. {
  3. invites.DefaultMinPermissions((int)Permissions.Admin);
  4. //Usage: invites accept [inviteCode]
  5. invites.CreateCommand("accept")
  6. .ArgsEqual(1)
  7. .Do(async e =>
  8. {
  9. try
  10. {
  11. await _client.AcceptInvite(e.Args[0]);
  12. await _client.SendMessage(e.Channel, "Invite \"" + e.Args[0] + "\" accepted.");
  13. }
  14. catch (HttpException ex)
  15. {
  16. await _client.SendMessage(e.Channel, "Error: " + ex.Message);
  17. }
  18. });
  19. });

Introduction

No Description

No topics