From f94a3852e81058638803fb27341890859a2bd621 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zachary=20Gu=C3=A9not?= Date: Tue, 19 Aug 2025 22:40:12 +0200 Subject: [PATCH 1/2] Fix logs debug twitch --- src/events/client/ready.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/events/client/ready.ts b/src/events/client/ready.ts index 2895c4d..ae68b46 100644 --- a/src/events/client/ready.ts +++ b/src/events/client/ready.ts @@ -27,7 +27,6 @@ export async function execute(client: Client) { const mongo_url = `mongodb://${process.env.MONGOOSE_USER}:${process.env.MONGOOSE_PASSWORD}@${process.env.MONGOOSE_HOST}/${process.env.MONGOOSE_DATABASE}` await connect(mongo_url).catch(console.error) - if (process.env.NODE_ENV === "development") await twitchClient.eventSub.deleteAllSubscriptions() const streamerIds: string[] = [] await Promise.all(client.guilds.cache.map(async guild => { @@ -71,6 +70,10 @@ export async function execute(client: Client) { if (!user) { logConsole('twitch', 'ready.user_not_found', { guild: guild.name, userId: streamer.twitchUserId }); return } const userSubs = await twitchClient.eventSub.getSubscriptionsForUser(streamer.twitchUserId) + if (process.env.NODE_ENV === "development") { + console.log(userSubs) + userSubs.data.forEach(sub => { console.log(sub) }) + } if (!userSubs.data.find(sub => sub.transportMethod === "webhook" && sub.type === "stream.online")) { // eslint-disable-next-line @typescript-eslint/no-misused-promises listener.onStreamOnline(streamer.twitchUserId, onlineSub) @@ -106,8 +109,6 @@ export async function execute(client: Client) { logConsole('twitch', 'ready.stream_offline_cleanup', { guild: guild.name, userName: user.name }) await cleanupMessageId(guildProfile, streamer.twitchUserId) } - - logConsole('twitch', 'user_operational', { name: user.name, id: streamer.twitchUserId }) })) })) -- 2.43.0 From 18a293690eb1ca4d7c5f3570804762ec46ede34d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zachary=20Gu=C3=A9not?= Date: Tue, 19 Aug 2025 22:46:05 +0200 Subject: [PATCH 2/2] Update version and workflow --- .gitea/workflows/build-and-push.yml | 5 ----- deploy/values.yaml | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 4 files changed, 4 insertions(+), 9 deletions(-) diff --git a/.gitea/workflows/build-and-push.yml b/.gitea/workflows/build-and-push.yml index d9ae4e2..6f8d524 100644 --- a/.gitea/workflows/build-and-push.yml +++ b/.gitea/workflows/build-and-push.yml @@ -2,13 +2,8 @@ name: Build and Push Docker Image on: push: - branches: - - master tags: - 'build_*' - pull_request: - branches: - - master env: REGISTRY: rgy.angels-dev.fr diff --git a/deploy/values.yaml b/deploy/values.yaml index a678e1c..048d498 100644 --- a/deploy/values.yaml +++ b/deploy/values.yaml @@ -3,7 +3,7 @@ deployment: strategy: RollingUpdate image: repository: "rgy.angels-dev.fr/prod/bot_tamiseur" - tag: "build_2025-06-10_01h49" + tag: "build_2025-08-19_22h46" pullPolicy: IfNotPresent env: NODE_ENV: "production" diff --git a/package-lock.json b/package-lock.json index 15b283b..8f2b2de 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "bot_tamiseur", - "version": "4.0.0", + "version": "4.0.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "bot_tamiseur", - "version": "4.0.0", + "version": "4.0.1", "dependencies": { "@discord-player/extractor": "^7.1.0", "@discordjs/voice": "^0.18.0", diff --git a/package.json b/package.json index 3cae89f..b09cc4e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "bot_tamiseur", "description": "Listen to music and use fun commands with your friends!", - "version": "4.0.0", + "version": "4.0.1", "author": { "name": "Zachary Guénot" }, -- 2.43.0