Skip to content

Commit

Permalink
Merge pull request #117 from omg-community/booster-fix
Browse files Browse the repository at this point in the history
Fix intents
  • Loading branch information
iminlikewithyou authored Dec 11, 2023
2 parents 2d7a3ab + fad4fad commit 64d51bc
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/sleuth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ import path from 'node:path';

export const sleuthClient = new Client({
intents: [
GatewayIntentBits.Guilds
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMembers,
GatewayIntentBits.GuildModeration,
GatewayIntentBits.GuildPresences
],
allowedMentions: { parse: ['users'] }
});
Expand Down Expand Up @@ -44,12 +47,8 @@ export async function createBoosterIcon(name: string, rolePos: number, iconResiz

export async function assignRole(userID: string, roleID: string): Promise<void> {
let guild = sleuthClient.guilds.cache.get(process.env.GUILD_ID);

let member = guild.members.cache.get(userID);

console.log(userID, roleID);
console.log(member);

await member.roles.add(roleID);
}

Expand Down

0 comments on commit 64d51bc

Please sign in to comment.