users.go 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. package discordgo
  2. type User struct {
  3. Id string `json:"id"`
  4. Email string `json:"email"`
  5. Username string `json:"username"`
  6. Avatar string `json:"Avatar"`
  7. Verified bool `json:"verified"`
  8. //Discriminator int `json:"discriminator,string"` // TODO: See below
  9. }
  10. // Discriminator sometimes comes as a string
  11. // and sometimes it comes as a int. Weird.
  12. // to avoid errors I've just commented it out
  13. // but it doesn't seem to just kill the whole
  14. // program. Heartbeat is taken on READY even
  15. // with error and the system continues to read
  16. // it just doesn't seem able to handle this one
  17. // field correctly. Need to research this more.
  18. type PrivateChannel struct {
  19. Id string `json:"id"`
  20. IsPrivate bool `json:"is_private"`
  21. LastMessageId string `json:"last_message_id"`
  22. Recipient User `json:"recipient"`
  23. } // merge with channel?
  24. type Settings struct {
  25. RenderEmbeds bool `json:"render_embeds"`
  26. InlineEmbedMedia bool `json:"inline_embed_media"`
  27. EnableTtsCommand bool `json:"enable_tts_command"`
  28. MessageDisplayCompact bool `json:"message_display_compact"`
  29. Locale string `json:"locale"`
  30. ShowCurrentGame bool `json:"show_current_game"`
  31. Theme string `json:"theme"`
  32. MutedChannels []string `json:"muted_channels"`
  33. }
  34. // PM function to PM a user.