structs.go 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. package discordgo
  2. type User struct {
  3. Id int `json:"id,string"`
  4. Email string `json:"email"`
  5. Username string `json:"username"`
  6. Avatar string `json:"Avatar"`
  7. Verified bool `json:"verified"`
  8. Discriminator string `json:"discriminator"`
  9. }
  10. type Server struct {
  11. Id int `json:"id,string"`
  12. Name string `json:"name"`
  13. Icon string `json:"icon"`
  14. Region string `json:"region"`
  15. Joined_at string `json:"joined_at"`
  16. Afk_timeout int `json:"afk_timeout"`
  17. Afk_channel_id int `json:"afk_channel_id"`
  18. Embed_channel_id int `json:"embed_channel_id"`
  19. Embed_enabled bool `json:"embed_enabled"`
  20. Owner_id int `json:"owner_id,string"`
  21. Roles []Role `json:"roles"`
  22. }
  23. type Role struct {
  24. Id int `json:"id,string"`
  25. Name string `json:"name"`
  26. Managed bool `json:"managed"`
  27. Color int `json:"color"`
  28. Hoist bool `json:"hoist"`
  29. Position int `json:"position"`
  30. Permissions int `json:"permissions"`
  31. }
  32. type Channel struct {
  33. Server_id int `json:"guild_id,string,omitempty"`
  34. Id int `json:"id,string"`
  35. Name string `json:"name"`
  36. Topic string `json:"topic"`
  37. Position int `json:"position"`
  38. Last_message_id int `json:"last_message_id,string"`
  39. Type string `json:"type"`
  40. Is_private bool `json:"is_private"`
  41. Permission_overwrites string `json:"-"` // ignored for now
  42. }
  43. type Message struct {
  44. Attachments []Attachment
  45. Tts bool
  46. Embeds []Embed
  47. Timestamp string
  48. Mention_everyone bool
  49. Id int `json:",string"`
  50. Edited_timestamp string
  51. Author *Author
  52. Content string
  53. Channel_id int `json:",string"`
  54. Mentions []Mention
  55. }
  56. type Mention struct {
  57. }
  58. type Attachment struct {
  59. }
  60. type Embed struct {
  61. }
  62. type Author struct {
  63. Username string
  64. Discriminator int `json:",string"`
  65. Id int `json:",string"`
  66. Avatar string
  67. }