diff --git a/restapi.go b/restapi.go index bf5065b..b2faac1 100644 --- a/restapi.go +++ b/restapi.go @@ -351,7 +351,7 @@ func (s *Session) UserChannelCreate(recipientID string) (st *Channel, err error) } // UserGuilds returns an array of Guild structures for all guilds. -func (s *Session) UserGuilds() (st []*Guild, err error) { +func (s *Session) UserGuilds() (st []*UserGuild, err error) { body, err := s.Request("GET", EndpointUserGuilds("@me"), nil) if err != nil { diff --git a/structs.go b/structs.go index 19a291f..c9d54db 100644 --- a/structs.go +++ b/structs.go @@ -220,6 +220,15 @@ type Guild struct { Unavailable *bool `json:"unavailable"` } +// A UserGuild holds a brief version of a Guild +type UserGuild struct { + ID string `json:"id"` + Name string `json:"name"` + Icon string `json:"icon"` + Owner bool `json:"owner"` + Permissions int `json:"permissions"` +} + // A GuildParams stores all the data needed to update discord guild settings type GuildParams struct { Name string `json:"name"`