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.

intro.md 1.0 kB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. ---
  2. uid: Guides.GuildEvents.Intro
  3. title: Introduction to Guild Events
  4. ---
  5. # Guild Events
  6. Guild events are a way to host events within a guild. They offer alot of features and flexibility.
  7. ## Getting started with guild events
  8. You can access any events within a guild by calling `GetEventsAsync` on a guild.
  9. ```cs
  10. var guildEvents = await guild.GetEventsAsync();
  11. ```
  12. If your working with socket guilds you can just use the `Events` property:
  13. ```cs
  14. var guildEvents = guild.Events;
  15. ```
  16. There are also new gateway events that you can hook to receive guild scheduled events on.
  17. ```cs
  18. // Fired when a guild event is cancelled.
  19. client.GuildScheduledEventCancelled += ...
  20. // Fired when a guild event is completed.
  21. client.GuildScheduledEventCompleted += ...
  22. // Fired when a guild event is started.
  23. client.GuildScheduledEventStarted += ...
  24. // Fired when a guild event is created.
  25. client.GuildScheduledEventCreated += ...
  26. // Fired when a guild event is updated.
  27. client.GuildScheduledEventUpdated += ...
  28. ```