Fix duplication WS Twitch + types

This commit is contained in:
Angels-dev
2025-01-04 17:21:49 +01:00
parent 6e29e7c8e4
commit 5af815d99f
6 changed files with 6524 additions and 4604 deletions

View File

@@ -130,7 +130,7 @@ export async function notification (client_id: string, client_secret: string, ch
.setImage(stream_data.thumbnail_url.replace('{width}', '1920').replace('{height}', '1080'))
.setTimestamp()
let hidden = hyperlink('démarre un live', 'https://www.youtube.com/watch?v=dQw4w9WgXcQ&pp=ygUJcmljayByb2xs')
let message = await liveChannel.send({ content: `Hey ! <@${dbData.liveBroadcasterId}> ${hidden} sur **Twitch**, venez !`, embeds: [embed] })
let message = await liveChannel.send({ content: `Hey @everyone ! <@${dbData.liveBroadcasterId}> ${hidden} sur **Twitch**, venez !`, embeds: [embed] })
dbData.liveMessageId = message.id
guildProfile.set('guildTwitch', dbData)
@@ -167,7 +167,7 @@ export async function notification (client_id: string, client_secret: string, ch
.setAuthor({ name: `⚫ C'EST FINI, LE LIVE A DURÉ ${duration_string} ! 📼`, iconURL: user_profile_image_url })
.setTimestamp()
message.edit({ content: `Re !\n<@${dbData.liveBroadcasterId}> a terminé son live sur **Twitch** !`, embeds: [embed] }).catch(console.error)
message.edit({ content: `Re @everyone !\n<@${dbData.liveBroadcasterId}> a terminé son live sur **Twitch** !`, embeds: [embed] }).catch(console.error)
clearInterval(liveMessageInterval)
}
}