From fe3e04307a609ea5c24f944e1a773100bc4e48ab Mon Sep 17 00:00:00 2001 From: sebm253 <42180891+sebm253@users.noreply.github.com> Date: Wed, 11 Dec 2024 20:42:27 +0100 Subject: [PATCH] Remove rest.GetDMChannels MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit it does nothing lulz thanks discord 🙏 --- rest/rest_endpoints.go | 1 - rest/users.go | 6 ------ 2 files changed, 7 deletions(-) diff --git a/rest/rest_endpoints.go b/rest/rest_endpoints.go index 5eb04959..f64a8d1a 100644 --- a/rest/rest_endpoints.go +++ b/rest/rest_endpoints.go @@ -44,7 +44,6 @@ var ( GetCurrentUserApplicationRoleConnection = NewNoBotAuthEndpoint(http.MethodGet, "/users/@me/applications/{application.id}/role-connection") UpdateCurrentUserApplicationRoleConnection = NewNoBotAuthEndpoint(http.MethodPut, "/users/@me/applications/{application.id}/role-connection") LeaveGuild = NewEndpoint(http.MethodDelete, "/users/@me/guilds/{guild.id}") - GetDMChannels = NewEndpoint(http.MethodGet, "/users/@me/channels") CreateDMChannel = NewEndpoint(http.MethodPost, "/users/@me/channels") ) diff --git a/rest/users.go b/rest/users.go index 18850132..2f9f69ce 100644 --- a/rest/users.go +++ b/rest/users.go @@ -16,7 +16,6 @@ type Users interface { GetUser(userID snowflake.ID, opts ...RequestOpt) (*discord.User, error) UpdateCurrentUser(userUpdate discord.UserUpdate, opts ...RequestOpt) (*discord.OAuth2User, error) LeaveGuild(guildID snowflake.ID, opts ...RequestOpt) error - GetDMChannels(opts ...RequestOpt) ([]discord.Channel, error) CreateDMChannel(userID snowflake.ID, opts ...RequestOpt) (*discord.DMChannel, error) } @@ -38,11 +37,6 @@ func (s *userImpl) LeaveGuild(guildID snowflake.ID, opts ...RequestOpt) error { return s.client.Do(LeaveGuild.Compile(nil, guildID), nil, nil, opts...) } -func (s *userImpl) GetDMChannels(opts ...RequestOpt) (channels []discord.Channel, err error) { - err = s.client.Do(GetDMChannels.Compile(nil), nil, &channels, opts...) - return -} - func (s *userImpl) CreateDMChannel(userID snowflake.ID, opts ...RequestOpt) (channel *discord.DMChannel, err error) { err = s.client.Do(CreateDMChannel.Compile(nil), discord.DMChannelCreate{RecipientID: userID}, &channel, opts...) return