structs.go 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. package discordgo
  2. // TODO: Eventually everything here gets moved to a better place.
  3. // A Message stores all data related to a specific Discord message.
  4. type Message struct {
  5. ID int `json:"id,string"`
  6. Author User `json:"author"`
  7. Content string `json:"content"`
  8. Attachments []Attachment `json:"attachments"`
  9. Tts bool `json:"tts"`
  10. Embeds []Embed `json:"embeds"`
  11. Timestamp string `json:"timestamp"`
  12. MentionEveryone bool `json:"mention_everyone"`
  13. EditedTimestamp string `json:"edited_timestamp"`
  14. Mentions []User `json:"mentions"`
  15. ChannelID int `json:"channel_id,string"`
  16. }
  17. // An Attachment stores data for message attachments.
  18. type Attachment struct { //TODO figure this out
  19. }
  20. // An Embed stores data for message embeds.
  21. type Embed struct { // TODO figure this out
  22. }
  23. // A VoiceRegion stores data for a specific voice region server.
  24. type VoiceRegion struct {
  25. ID string `json:"id"`
  26. Name string `json:"name"`
  27. Hostname string `json:"sample_hostname"`
  28. Port int `json:"sample_port"`
  29. }
  30. // A VoiceICE stores data for voice ICE servers.
  31. type VoiceICE struct {
  32. TTL int `json:"ttl,string"`
  33. Servers []ICEServer `json:"servers"`
  34. }
  35. // A ICEServer stores data for a specific voice ICE server.
  36. type ICEServer struct {
  37. URL string `json:"url"`
  38. Username string `json:"username"`
  39. Credential string `json:"credential"`
  40. }
  41. // A Invite stores all data related to a specific Discord Guild or Channel invite.
  42. type Invite struct {
  43. MaxAge int `json:"max_age"`
  44. Code string `json:"code"`
  45. Guild Guild `json:"guild"`
  46. Revoked bool `json:"revoked"`
  47. CreatedAt string `json:"created_at"` // TODO make timestamp
  48. Temporary bool `json:"temporary"`
  49. Uses int `json:"uses"`
  50. MaxUses int `json:"max_uses"`
  51. Inviter User `json:"inviter"`
  52. XkcdPass bool `json:"xkcdpass"`
  53. Channel Channel `json:"channel"`
  54. }