From 5f8ee0a0ad04f85cf0987c1a0ed8e16d3ef509cf Mon Sep 17 00:00:00 2001 From: sebm253 <42180891+sebm253@users.noreply.github.com> Date: Fri, 18 Oct 2024 21:31:32 +0200 Subject: [PATCH] Remove nonexistent permission overwrite routes --- rest/channels.go | 12 ------------ rest/rest_endpoints.go | 2 -- 2 files changed, 14 deletions(-) diff --git a/rest/channels.go b/rest/channels.go index afb6d349..477d0107 100644 --- a/rest/channels.go +++ b/rest/channels.go @@ -20,8 +20,6 @@ type Channels interface { GetWebhooks(channelID snowflake.ID, opts ...RequestOpt) ([]discord.Webhook, error) CreateWebhook(channelID snowflake.ID, webhookCreate discord.WebhookCreate, opts ...RequestOpt) (*discord.IncomingWebhook, error) - GetPermissionOverwrites(channelID snowflake.ID, opts ...RequestOpt) ([]discord.PermissionOverwrite, error) - GetPermissionOverwrite(channelID snowflake.ID, overwriteID snowflake.ID, opts ...RequestOpt) (*discord.PermissionOverwrite, error) UpdatePermissionOverwrite(channelID snowflake.ID, overwriteID snowflake.ID, permissionOverwrite discord.PermissionOverwriteUpdate, opts ...RequestOpt) error DeletePermissionOverwrite(channelID snowflake.ID, overwriteID snowflake.ID, opts ...RequestOpt) error @@ -96,16 +94,6 @@ func (s *channelImpl) CreateWebhook(channelID snowflake.ID, webhookCreate discor return } -func (s *channelImpl) GetPermissionOverwrites(channelID snowflake.ID, opts ...RequestOpt) (overwrites []discord.PermissionOverwrite, err error) { - err = s.client.Do(GetPermissionOverwrites.Compile(nil, channelID), nil, &overwrites, opts...) - return -} - -func (s *channelImpl) GetPermissionOverwrite(channelID snowflake.ID, overwriteID snowflake.ID, opts ...RequestOpt) (overwrite *discord.PermissionOverwrite, err error) { - err = s.client.Do(GetPermissionOverwrite.Compile(nil, channelID, overwriteID), nil, &overwrite, opts...) - return -} - func (s *channelImpl) UpdatePermissionOverwrite(channelID snowflake.ID, overwriteID snowflake.ID, permissionOverwrite discord.PermissionOverwriteUpdate, opts ...RequestOpt) error { return s.client.Do(UpdatePermissionOverwrite.Compile(nil, channelID, overwriteID), permissionOverwrite, nil, opts...) } diff --git a/rest/rest_endpoints.go b/rest/rest_endpoints.go index 5015e6b9..e61bcf94 100644 --- a/rest/rest_endpoints.go +++ b/rest/rest_endpoints.go @@ -176,8 +176,6 @@ var ( GetChannelWebhooks = NewEndpoint(http.MethodGet, "/channels/{channel.id}/webhooks") CreateWebhook = NewEndpoint(http.MethodPost, "/channels/{channel.id}/webhooks") - GetPermissionOverwrites = NewEndpoint(http.MethodGet, "/channels/{channel.id}/permissions") - GetPermissionOverwrite = NewEndpoint(http.MethodGet, "/channels/{channel.id}/permissions/{overwrite.id}") UpdatePermissionOverwrite = NewEndpoint(http.MethodPut, "/channels/{channel.id}/permissions/{overwrite.id}") DeletePermissionOverwrite = NewEndpoint(http.MethodDelete, "/channels/{channel.id}/permissions/{overwrite.id}")