Compare commits
1 Commits
build_2025
...
build-and-
| Author | SHA1 | Date | |
|---|---|---|---|
|
6d0c0145ee
|
@@ -83,6 +83,7 @@ export async function execute(interaction: ChatInputCommandInteraction) {
|
|||||||
const result = await player.search(query, { requestedBy: interaction.user })
|
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 })
|
if (!result.hasTracks()) return interaction.followUp({ content: t(interaction.locale, "player.no_track_found", { query }), flags: MessageFlags.Ephemeral })
|
||||||
const track = result.tracks[0]
|
const track = result.tracks[0]
|
||||||
|
if (process.env.NODE_ENV === "development") console.log(query, result, track)
|
||||||
|
|
||||||
const entry = queue.tasksQueue.acquire()
|
const entry = queue.tasksQueue.acquire()
|
||||||
await entry.getTask()
|
await entry.getTask()
|
||||||
@@ -106,6 +107,7 @@ export async function autocompleteRun(interaction: AutocompleteInteraction) {
|
|||||||
|
|
||||||
const resultsSpotify = await player.search(query, { searchEngine: `ext:${SpotifyExtractor.identifier}` })
|
const resultsSpotify = await player.search(query, { searchEngine: `ext:${SpotifyExtractor.identifier}` })
|
||||||
const resultsYouTube = await player.search(query, { searchEngine: `ext:${YoutubeiExtractor.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 => ({
|
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})`}`,
|
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