Removed state checking from (s *Session) Guild(...) to be consistent with other methods (#530)

This commit is contained in:
Noah Santschi-Cooney 2018-04-07 23:53:07 +01:00 committed by Chris Rhodes
parent 75d58fe706
commit 169895af55

View file

@ -577,14 +577,6 @@ func memberPermissions(guild *Guild, channel *Channel, member *Member) (apermiss
// Guild returns a Guild structure of a specific Guild. // Guild returns a Guild structure of a specific Guild.
// guildID : The ID of a Guild // guildID : The ID of a Guild
func (s *Session) Guild(guildID string) (st *Guild, err error) { func (s *Session) Guild(guildID string) (st *Guild, err error) {
if s.StateEnabled {
// Attempt to grab the guild from State first.
st, err = s.State.Guild(guildID)
if err == nil {
return
}
}
body, err := s.RequestWithBucketID("GET", EndpointGuild(guildID), nil, EndpointGuild(guildID)) body, err := s.RequestWithBucketID("GET", EndpointGuild(guildID), nil, EndpointGuild(guildID))
if err != nil { if err != nil {
return return