Fix duplicate streamWatching, locale guild et console log/error
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 3m43s
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 3m43s
This commit is contained in:
@@ -6,6 +6,7 @@ import type { APIResponseData, APIResponseDataError, GetChallenge, LcdConfig, Op
|
||||
import type { GuildFbx } from "@/types/schemas"
|
||||
import dbGuild from "@/schemas/guild"
|
||||
import { t } from "@/utils/i18n"
|
||||
import { logConsoleError } from "@/utils/console"
|
||||
|
||||
export const id = "freebox_lcd_status"
|
||||
export async function execute(interaction: ButtonInteraction) {
|
||||
@@ -82,7 +83,7 @@ export async function execute(interaction: ButtonInteraction) {
|
||||
|
||||
return await interaction.followUp({ embeds: [embed], flags: MessageFlags.Ephemeral })
|
||||
} catch (error) {
|
||||
console.error("Erreur lors de la récupération de l'état LCD:", error)
|
||||
logConsoleError('freebox', 'lcd_status_error', undefined, error as Error)
|
||||
return interaction.followUp({ content: t(interaction.locale, "freebox.lcd.unexpected_error"), flags: MessageFlags.Ephemeral })
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import type { APIResponseData, APIResponseDataError, APIResponseDataVersion, Con
|
||||
import type { GuildFbx } from "@/types/schemas"
|
||||
import dbGuild from "@/schemas/guild"
|
||||
import { t } from "@/utils/i18n"
|
||||
import { logConsoleError } from "@/utils/console"
|
||||
|
||||
export const id = "freebox_test_connection"
|
||||
export async function execute(interaction: ButtonInteraction) {
|
||||
@@ -65,7 +66,7 @@ export async function execute(interaction: ButtonInteraction) {
|
||||
|
||||
return await interaction.followUp({ embeds: [embed], flags: MessageFlags.Ephemeral })
|
||||
} catch (error) {
|
||||
console.error("Erreur lors du test de connexion Freebox:", error)
|
||||
logConsoleError('freebox', 'test_connection_error', undefined, error as Error)
|
||||
return interaction.followUp({ content: t(interaction.locale, "freebox.test.connection_error"), flags: MessageFlags.Ephemeral })
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import type { GuildTwitch } from "@/types/schemas"
|
||||
import dbGuild from "@/schemas/guild"
|
||||
import { twitchClient } from "@/utils/twitch"
|
||||
import { t } from "@/utils/i18n"
|
||||
import { logConsole } from "@/utils/console"
|
||||
import { logConsoleError } from "@/utils/console"
|
||||
|
||||
export const id = "twitch_streamer_list"
|
||||
export async function execute(interaction: ButtonInteraction) {
|
||||
@@ -34,8 +34,7 @@ export async function execute(interaction: ButtonInteraction) {
|
||||
streamers.push(`**${index + 1}.** ${t(interaction.locale, "twitch.list.user_not_found")}\n└ ID: \`${streamer.twitchUserId}\``)
|
||||
}
|
||||
} catch (error) {
|
||||
logConsole('twitch', 'user_fetch_error_buttons', { id: streamer.twitchUserId })
|
||||
console.error(error)
|
||||
logConsoleError('twitch', 'user_fetch_error', { id: streamer.twitchUserId }, error as Error)
|
||||
streamers.push(`**${index + 1}.** ${t(interaction.locale, "twitch.list.fetch_error")}\n└ ID: \`${streamer.twitchUserId}\``)
|
||||
}
|
||||
}))
|
||||
|
||||
@@ -4,7 +4,7 @@ import { twitchClient } from "@/utils/twitch"
|
||||
import type { GuildTwitch } from "@/types/schemas"
|
||||
import dbGuild from "@/schemas/guild"
|
||||
import { t } from "@/utils/i18n"
|
||||
import { logConsole } from "@/utils/console"
|
||||
import { logConsoleError } from "@/utils/console"
|
||||
|
||||
export const id = "twitch_streamer_remove"
|
||||
export async function execute(interaction: ButtonInteraction) {
|
||||
@@ -25,8 +25,7 @@ export async function execute(interaction: ButtonInteraction) {
|
||||
description: user ? `@${user.name}` : t(interaction.locale, "twitch.user_not_found")
|
||||
}
|
||||
} catch (error) {
|
||||
logConsole('twitch', 'user_fetch_error_buttons', { id: streamer.twitchUserId })
|
||||
console.error(error)
|
||||
logConsoleError('twitch', 'user_fetch_error', { id: streamer.twitchUserId }, error as Error)
|
||||
return {
|
||||
label: `ID: ${streamer.twitchUserId}`,
|
||||
value: streamer.twitchUserId,
|
||||
|
||||
Reference in New Issue
Block a user