Awarding a member or a role through the built-in Guilded EXP system.
Award a specific member
// Detect when a message is created.client.on('messageCreate',async (message)=> {if (message.member.app ==true) return;// Award the author of the message 1000 EXP.// The amount of EXP is limited to 1000.awaitmessage.member.award(1000)// ORawaitclient.rest.guilds.awardMember(message.guildID,message.member.id,1000)})
Award multiple members
// Detect when a message is created.client.on('messageCreate',async (message)=> {if (message.member.app ==true) return;// Award 2 members of the guild 1000 EXP.// The amount of EXP is limited to 1000.awaitmessage.guild.bulkAwardXPMembers({ amount:1000, userIds: ["dOW30kPd","ArbX9wnA"] })// ORawaitclient.rest.guilds.bulkAwardXPMembers(message.guildID, { amount:1000, userIds: ["dOW30kPd","ArbX9wnA"] })})
Award a specific role
// Detect when a message is created.client.on('messageCreate',async (message)=> {let roleId =35447832;if (message.member.app ==true) return;// Award the role of the author 1000 EXP.// The amount of EXP is limited to 1000.awaitclient.rest.guilds.awardRole(message.guildID, roleId,1000)})
Set the XP of a specific member
// Detect when a message is created.client.on('messageCreate',async (message)=> {if (message.member.app ==true) return;// Set the EXP of the author to 1000000000.// The amount of EXP is limited to 1000000000.awaitmessage.guild.setMemberXP(message.memberID,1000000000);})