From b9bf6ad8cb0f330d4f52efd91a6d2d938ff49510 Mon Sep 17 00:00:00 2001 From: tippfehlr Date: Sat, 13 Apr 2024 12:46:51 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20don=E2=80=99t=20use=20...role=20to=20fil?= =?UTF-8?q?l=20values?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/bot.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/modules/bot.ts b/src/modules/bot.ts index 78644bc..83aeb25 100644 --- a/src/modules/bot.ts +++ b/src/modules/bot.ts @@ -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(); } @@ -356,7 +360,7 @@ export async function processRoles({ userActivity.toLowerCase().includes(activityRole.activityName.toLowerCase()), )) ) { - addRole({ ...activityRole }); + addRole({ roleID: activityRole.roleID, permanent: activityRole.permanent }); } });