Skip to content

Commit

Permalink
remove pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
mlnrDev committed Sep 4, 2022
1 parent ebf18a6 commit 1bf9a0b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion discord/member.go
Expand Up @@ -85,5 +85,5 @@ type MemberUpdate struct {

// CurrentMemberUpdate is used to update the current member
type CurrentMemberUpdate struct {
Nick *string `json:"nick"`
Nick string `json:"nick"`
}
4 changes: 2 additions & 2 deletions rest/members.go
Expand Up @@ -22,7 +22,7 @@ type Members interface {
AddMemberRole(guildID snowflake.ID, userID snowflake.ID, roleID snowflake.ID, opts ...RequestOpt) error
RemoveMemberRole(guildID snowflake.ID, userID snowflake.ID, roleID snowflake.ID, opts ...RequestOpt) error

UpdateCurrentMember(guildID snowflake.ID, nick *string, opts ...RequestOpt) (*string, error)
UpdateCurrentMember(guildID snowflake.ID, nick string, opts ...RequestOpt) (*string, error)

UpdateCurrentUserVoiceState(guildID snowflake.ID, currentUserVoiceStateUpdate discord.UserVoiceStateUpdate, opts ...RequestOpt) error
UpdateUserVoiceState(guildID snowflake.ID, userID snowflake.ID, userVoiceStateUpdate discord.UserVoiceStateUpdate, opts ...RequestOpt) error
Expand Down Expand Up @@ -95,7 +95,7 @@ func (s *memberImpl) RemoveMemberRole(guildID snowflake.ID, userID snowflake.ID,
return s.client.Do(RemoveMemberRole.Compile(nil, guildID, userID, roleID), nil, nil, opts...)
}

func (s *memberImpl) UpdateCurrentMember(guildID snowflake.ID, nick *string, opts ...RequestOpt) (nickName *string, err error) {
func (s *memberImpl) UpdateCurrentMember(guildID snowflake.ID, nick string, opts ...RequestOpt) (nickName *string, err error) {
err = s.client.Do(UpdateCurrentMember.Compile(nil, guildID), discord.CurrentMemberUpdate{Nick: nick}, nickName, opts...)
return
}
Expand Down

0 comments on commit 1bf9a0b

Please sign in to comment.