Merge branch 'dev' into 'main'

Dev

See merge request illegitimate/illegitimate-bot!228
This commit is contained in:
2024-02-17 17:43:55 +00:00
2 changed files with 17 additions and 4 deletions

View File

@@ -29,10 +29,23 @@ export default async function nowplaying(interaction: ChatInputCommandInteractio
return return
} }
const progressBar = queue.node.createProgressBar({
leftChar: "▬",
rightChar: "▬",
separator: "|",
indicator: "🔘",
timecodes: true,
length: 15
})
await interaction.editReply({ await interaction.editReply({
embeds: [{ embeds: [{
title: "Now Playing", title: "Now Playing",
description: `[${current.title}](${current.url})`, description: `
[${current.title}](${current.url})
${progressBar}
`,
color: embedColor, color: embedColor,
thumbnail: { thumbnail: {
url: current.thumbnail url: current.thumbnail

View File

@@ -19,14 +19,14 @@ export = {
const player = useMainPlayer() const player = useMainPlayer()
const { tracks } = await player.search(focusedOption.value, { const { tracks } = await player.search(focusedOption.value, {
searchEngine: QueryType.YOUTUBE_SEARCH searchEngine: QueryType.AUTO_SEARCH
}) })
const results = tracks.map(track => ({ const results = tracks.map(track => ({
name: track.title.slice(0, 100), name: `${track.title} [${track.author}]`,
value: track.url value: track.url
})) }))
await interaction.respond(results.slice(0, 25)).catch() await interaction.respond(results.slice(0, 10)).catch()
} }
} as IAutocomplete } as IAutocomplete