Merge branch 'dev' into production
All checks were successful
CI / CD / test-build (push) Successful in 10m15s
CI / CD / deploy-dev (push) Has been skipped
CI / CD / deploy-production (push) Successful in 23s

This commit is contained in:
2026-04-23 22:40:22 +02:00
4 changed files with 36 additions and 20 deletions

View File

@@ -117,6 +117,9 @@ jobs:
-e BOT_PORT=3001 \ -e BOT_PORT=3001 \
$BOT_IMAGE $BOT_IMAGE
# Connect bot to proxy network so n8n can reach it
docker network connect proxy $BOT_CONTAINER 2>/dev/null || true
# Start new portfolio container # Start new portfolio container
echo "🆕 Starting new dev container..." echo "🆕 Starting new dev container..."
docker run -d \ docker run -d \

View File

@@ -35,7 +35,8 @@ function updatePresence(guild) {
cachedData.activities = presence.activities cachedData.activities = presence.activities
? presence.activities ? presence.activities
.filter((a) => a.type !== ActivityType.Custom) .filter((a) => a.type !== ActivityType.Custom)
.map((a) => ({ .map((a) => {
const entry = {
name: a.name, name: a.name,
type: a.type, type: a.type,
details: a.details || null, details: a.details || null,
@@ -54,7 +55,17 @@ function updatePresence(guild) {
end: a.timestamps.end?.toISOString() || null, end: a.timestamps.end?.toISOString() || null,
} }
: null, : null,
})) };
if (a.applicationId && a.assets?.largeImage) {
const imgId = a.assets.largeImage.startsWith("mp:external")
? `https://media.discordapp.net/${a.assets.largeImage.replace("mp:", "")}`
: `https://cdn.discordapp.com/app-assets/${a.applicationId}/${a.assets.largeImage}.png`;
entry.image = imgId;
} else if (a.assets?.largeImage) {
entry.image = `https://cdn.discordapp.com/app-assets/0/${a.assets.largeImage}.png`;
}
return entry;
})
: []; : [];
const spotifyActivity = presence.activities const spotifyActivity = presence.activities

View File

@@ -115,6 +115,7 @@ services:
- BOT_PORT=3001 - BOT_PORT=3001
networks: networks:
- portfolio_net - portfolio_net
- proxy
healthcheck: healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:3001/presence"] test: ["CMD", "wget", "-qO-", "http://localhost:3001/presence"]
interval: 30s interval: 30s

View File

@@ -99,6 +99,7 @@ services:
- BOT_PORT=3001 - BOT_PORT=3001
networks: networks:
- portfolio_net - portfolio_net
- proxy
healthcheck: healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:3001/presence"] test: ["CMD", "wget", "-qO-", "http://localhost:3001/presence"]
interval: 30s interval: 30s