Compare commits

..

1 Commits

Author SHA1 Message Date
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

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})`}`,