Skip to content

Commit

Permalink
fix: add return
Browse files Browse the repository at this point in the history
  • Loading branch information
MARCROCK22 committed Sep 8, 2024
1 parent 0c7067f commit a1b0c20
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/common/shorters/members.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ export class MemberShorter extends BaseShorter {
* @param id The ID of the role to add.
*/
addRole(guildId: string, memberId: string, id: string) {
this.client.proxy.guilds(guildId).members(memberId).roles(id).put({});
return this.client.proxy.guilds(guildId).members(memberId).roles(id).put({});
}
/**
* Removes a role from a guild member.
Expand Down
2 changes: 2 additions & 0 deletions src/structures/GuildMember.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ export class BaseGuildMember extends DiscordBase {
edit: (id: string, body: RESTPatchAPIGuildMemberJSONBody, reason?: string) =>
client.members.edit(guildId, id, body, reason),
add: (id: string, body: RESTPutAPIGuildMemberJSONBody) => client.members.add(guildId, id, body),
addRole: (memberId: string, id: string) => client.members.addRole(guildId, memberId, id),
removeRole: (memberId: string, id: string) => client.members.removeRole(guildId, memberId, id),
fetch: (memberId: string, force = false) => client.members.fetch(guildId, memberId, force),
list: (query?: RESTGetAPIGuildMembersQuery, force = false) => client.members.list(guildId, query, force),
};
Expand Down

0 comments on commit a1b0c20

Please sign in to comment.