Skip to content

Commit

Permalink
fix: don’t use ...role to fill values
Browse files Browse the repository at this point in the history
  • Loading branch information
tippfehlr committed Apr 13, 2024
1 parent 7228306 commit b9bf6ad
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/modules/bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,14 @@ client.on(Events.PresenceUpdate, async (oldMember, newMember) => {
.execute();

for (const role of activeTemporaryRolesHashed) {
activeTemporaryRoles.push({ userID: newMember.userId, ...role });
activeTemporaryRoles.push({
userID: newMember.userId,
roleID: role.roleID,
guildID: role.guildID,
});
await db
.insertInto('activeTemporaryRoles')
.values({ userID: newMember.userId, ...role })
.values({ userID: newMember.userId, roleID: role.roleID, guildID: role.guildID })
.onConflict(oc => oc.columns(['userID', 'roleID', 'guildID']).doNothing())
.execute();
}
Expand Down Expand Up @@ -356,7 +360,7 @@ export async function processRoles({
userActivity.toLowerCase().includes(activityRole.activityName.toLowerCase()),
))
) {
addRole({ ...activityRole });
addRole({ roleID: activityRole.roleID, permanent: activityRole.permanent });
}
});

Expand Down

0 comments on commit b9bf6ad

Please sign in to comment.