fix(GuildDelete)!: stop returning guild (#1329)

Stop returning Guild from GuildDelete, since underlying endpoint returns 204 (No Content).
This commit is contained in:
Elliot Williams 2023-05-25 14:02:03 +01:00 committed by Fedor Lapshin
parent 1252b71f38
commit dde7690782
No known key found for this signature in database
GPG key ID: 492D745FB49D2DAB

View file

@ -672,14 +672,9 @@ func (s *Session) GuildEdit(guildID string, g *GuildParams, options ...RequestOp
// GuildDelete deletes a Guild.
// guildID : The ID of a Guild
func (s *Session) GuildDelete(guildID string, options ...RequestOption) (st *Guild, err error) {
func (s *Session) GuildDelete(guildID string, options ...RequestOption) (err error) {
body, err := s.RequestWithBucketID("DELETE", EndpointGuild(guildID), nil, EndpointGuild(guildID), options...)
if err != nil {
return
}
err = unmarshal(body, &st)
_, err = s.RequestWithBucketID("DELETE", EndpointGuild(guildID), nil, EndpointGuild(guildID), options...)
return
}