From dde76907824ab6adeb88d82190a4ff459a135cfe Mon Sep 17 00:00:00 2001 From: Elliot Williams <4396779+elliotwms@users.noreply.github.com> Date: Thu, 25 May 2023 14:02:03 +0100 Subject: [PATCH] fix(GuildDelete)!: stop returning guild (#1329) Stop returning Guild from GuildDelete, since underlying endpoint returns 204 (No Content). --- restapi.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/restapi.go b/restapi.go index 359dc03..b2d6959 100644 --- a/restapi.go +++ b/restapi.go @@ -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 }