Skip to content

Commit

Permalink
Remove nonexistent permission overwrite routes
Browse files Browse the repository at this point in the history
  • Loading branch information
sebm253 committed Oct 18, 2024
1 parent cb461a5 commit 5f8ee0a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
12 changes: 0 additions & 12 deletions rest/channels.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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...)
}
Expand Down
2 changes: 0 additions & 2 deletions rest/rest_endpoints.go
Original file line number Diff line number Diff line change
Expand Up @@ -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}")

Expand Down

0 comments on commit 5f8ee0a

Please sign in to comment.