Update fix/twitch-notif #14
@@ -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})`}`,
|
||||
|
||||
Reference in New Issue
Block a user