Skip to content

Commit

Permalink
Remove rest.GetDMChannels
Browse files Browse the repository at this point in the history
it does nothing lulz thanks discord 🙏
  • Loading branch information
sebm253 committed Dec 11, 2024
1 parent 4c19fca commit fe3e043
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
1 change: 0 additions & 1 deletion rest/rest_endpoints.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
)

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

Expand All @@ -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
Expand Down

0 comments on commit fe3e043

Please sign in to comment.