Skip to content

Commit

Permalink
Ooooops
Browse files Browse the repository at this point in the history
  • Loading branch information
raphckrman committed May 10, 2024
1 parent 9288751 commit 51f2f2f
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
24 changes: 0 additions & 24 deletions lib/routes/Guilds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -768,28 +768,4 @@ export class Guilds {
path: endpoints.GUILD_CATEGORY_ROLE_PERMISSION(guildID, categoryID, targetID)
});
}

/** Award a member using the built-in EXP system.
* @param memberID ID of the member to award.
* @param amount Amount of experience to give.
*/
async awardMember(memberID: string, amount: number): Promise<number>{
return this.client.rest.guilds.awardMember(this.id as string, memberID, amount);
}

/** Set member's experience using the built-in EXP system.
* @param memberID ID of the member to award.
* @param amount Amount of experience to set.
*/
async setMemberXP(memberID: string, amount: number): Promise<number>{
return this.client.rest.guilds.setMemberXP(this.id as string, memberID, amount);
}

/** Award every members of a guild having a role using the built-in EXP system.
* @param roleID ID of a role.
* @param amount Amount of experience.
*/
async awardRole(roleID: number, amount: number): Promise<void> {
return this.client.rest.guilds.awardRole(this.id as string, roleID, amount);
}
}
24 changes: 24 additions & 0 deletions lib/structures/Guild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,4 +237,28 @@ export class Guild extends Base<string> {
async deleteCategory(categoryID: number): Promise<GuildCategory> {
return this.client.rest.guilds.deleteCategory(this.id as string, categoryID);
}

/** Award a member using the built-in EXP system.
* @param memberID ID of the member to award.
* @param amount Amount of experience to give.
*/
async awardMember(memberID: string, amount: number): Promise<number>{
return this.client.rest.guilds.awardMember(this.id as string, memberID, amount);
}

/** Set member's experience using the built-in EXP system.
* @param memberID ID of the member to award.
* @param amount Amount of experience to set.
*/
async setMemberXP(memberID: string, amount: number): Promise<number>{
return this.client.rest.guilds.setMemberXP(this.id as string, memberID, amount);
}

/** Award every members of a guild having a role using the built-in EXP system.
* @param roleID ID of a role.
* @param amount Amount of experience.
*/
async awardRole(roleID: number, amount: number): Promise<void> {
return this.client.rest.guilds.awardRole(this.id as string, roleID, amount);
}
}

0 comments on commit 51f2f2f

Please sign in to comment.