Compare commits

..

11 Commits

Author SHA1 Message Date
Zachary Guénot
560699c81d Merge branch 'master' into develop 2025-11-01 01:00:04 +01:00
Zachary Guénot
1926a6deb5 Prise en charge provider externaldns 2025-11-01 00:58:38 +01:00
Zachary Guénot
87272f4b45 Merge pull request 'Fix logs debug twitch' (#16) from develop into master
Reviewed-on: #16
2025-08-19 22:51:07 +02:00
Zachary Guénot
18a293690e Update version and workflow
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 4m22s
2025-08-19 22:46:05 +02:00
Zachary Guénot
fb7ba5d145 Merge pull request 'Fix logs debug twitch' (#15) from fix/twitch-notif into develop
Reviewed-on: #15
2025-08-19 22:41:24 +02:00
Zachary Guénot
f94a3852e8 Fix logs debug twitch 2025-08-19 22:40:12 +02:00
Zachary Guénot
462ad2e9d6 Merge pull request 'Update fix/twitch-notif' (#14) from develop into fix/twitch-notif
Reviewed-on: #14
2025-08-19 21:54:59 +02:00
Zachary Guénot
f1b5592045 Merge pull request 'Update develop' (#13) from master into develop
Reviewed-on: #13
2025-08-19 21:54:27 +02:00
Zachary Guénot
af4e6e2e69 Merge pull request 'Intégration dernières modifications' (#12) from build-and-deploy into master
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 1m53s
Reviewed-on: #12
2025-08-19 21:53:13 +02:00
Zachary Guénot
6d0c0145ee Ajout console.log débug play
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 7m13s
Build and Push Docker Image / build-and-push (pull_request) Successful in 12m16s
2025-06-11 20:34:42 +02:00
Zachary Guénot
f1a488d362 Merge pull request 'V4 - Build and Deploy' (#10) from build-and-deploy into master
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 1m19s
Reviewed-on: #10
2025-06-10 01:58:11 +02:00
8 changed files with 14 additions and 14 deletions

View File

@@ -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

View File

@@ -6,7 +6,7 @@ name: bot_tamiseur
# Version du chart : doit changer si l'application change ou si la configuration du chart change
#version: 1
version: "1"
version: "1.1.0"
# icon (optionnel) mais génère un warning avec "helm lint"
icon: https://helm.sh/img/helm-logo.svg

View File

@@ -4,7 +4,8 @@ kind: Ingress
metadata:
name: {{ .Release.Name }}
annotations:
external-dns.alpha.kubernetes.io/target: omegamaestro.{{ .Values.ingress.domain }}
external-dns.alpha.kubernetes.io/target: OmegaMaestro.{{- if eq .Values.ingress.provider "technitium" }}force-field.{{- end }}{{ .Values.ingress.domain }}
external-dns.alpha.kubernetes.io/{{ .Values.ingress.provider }}: "true"
cert-manager.io/cluster-issuer: {{ .Values.ingress.issuer }}
nginx.ingress.kubernetes.io/backend-protocol: "HTTP"
{{- if .Values.ingress.geoip }}

View File

@@ -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"
@@ -27,5 +27,6 @@ ingress:
class: nginx
subdomain: dcb-chantier.prd
domain: angels-dev.fr
provider: cloudflare
issuer: letsencrypt-prod
geoip: false

4
package-lock.json generated
View File

@@ -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",

View File

@@ -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"
},

View File

@@ -83,6 +83,7 @@ export async function execute(interaction: ChatInputCommandInteraction) {
const result = await player.search(query, { requestedBy: interaction.user })
if (!result.hasTracks()) return interaction.followUp({ content: t(interaction.locale, "player.no_track_found", { query }), flags: MessageFlags.Ephemeral })
const track = result.tracks[0]
if (process.env.NODE_ENV === "development") console.log(query, result, track)
const entry = queue.tasksQueue.acquire()
await entry.getTask()
@@ -106,6 +107,7 @@ export async function autocompleteRun(interaction: AutocompleteInteraction) {
const resultsSpotify = await player.search(query, { searchEngine: `ext:${SpotifyExtractor.identifier}` })
const resultsYouTube = await player.search(query, { searchEngine: `ext:${YoutubeiExtractor.identifier}` })
if (process.env.NODE_ENV === "development") console.log(resultsSpotify, resultsYouTube)
const tracksSpotify = resultsSpotify.tracks.slice(0, 5).map(t => ({
name: `Spotify: ${`${t.title} - ${t.author} (${t.duration})`.length > 75 ? `${`${t.title} - ${t.author}`.substring(0, 75)}... (${t.duration})` : `${t.title} - ${t.author} (${t.duration})`}`,

View File

@@ -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 })
}))
}))