From 92a5f4580f9568491bd28ac7d0b0f85c0e53f73f Mon Sep 17 00:00:00 2001 From: tippfehlr Date: Sat, 24 Aug 2024 10:13:28 +0200 Subject: [PATCH] fix: disable activityStats for now --- src/modules/db.ts | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/modules/db.ts b/src/modules/db.ts index 710586f..fc4bc4a 100644 --- a/src/modules/db.ts +++ b/src/modules/db.ts @@ -153,14 +153,18 @@ export function getLang(interaction: CommandInteraction | StringSelectMenuIntera } export async function addActivity(guildID: string, activityName: string) { - db.insertInto('activityStats') - .values({ guildID, activityName, count: 1 }) - .onConflict(oc => - oc - .columns(['guildID', 'activityName']) - .doUpdateSet(eb => ({ count: eb('activityStats.count', '+', 1) })), - ) - .execute(); + // if (activityName.includes('®')) { + // log.warn(`activityName '${activityName}'includes '®'. Somehow postgres doesn’t like this.`); + // return; + // } + // db.insertInto('activityStats') + // .values({ guildID, activityName, count: 1 }) + // .onConflict(oc => + // oc + // .columns(['guildID', 'activityName']) + // .doUpdateSet(eb => ({ count: eb('activityStats.count', '+', 1) })), + // ) + // .execute(); } export async function getRowCount(table: TableExpression) {