mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-04 14:38:49 +00:00
2 files changed
+10
-5
No files matched your search
@@ -29,12 +29,16 @@ module.exports = {
|
|||||||
const searchResults = await player.search(query);
|
const searchResults = await player.search(query);
|
||||||
|
|
||||||
logger.debug(`[Shard ${interaction.guild.shardId}] Autocomplete search responded for query: ${query}`);
|
logger.debug(`[Shard ${interaction.guild.shardId}] Autocomplete search responded for query: ${query}`);
|
||||||
return interaction.respond(
|
|
||||||
searchResults.tracks.slice(0, 5).map((track) => ({
|
let response = searchResults.tracks.slice(0, 5).map((track) => ({
|
||||||
name: `${track.title} [Author: ${track.author}]`,
|
name:
|
||||||
|
`${track.title} [Author: ${track.author}]`.length > 100
|
||||||
|
? `${track.title}`.slice(0, 100)
|
||||||
|
: `${track.title} [Author: ${track.author}]`,
|
||||||
value: track.url
|
value: track.url
|
||||||
}))
|
}));
|
||||||
);
|
|
||||||
|
return interaction.respond(response);
|
||||||
},
|
},
|
||||||
execute: async ({ interaction }) => {
|
execute: async ({ interaction }) => {
|
||||||
if (await notInVoiceChannel(interaction)) {
|
if (await notInVoiceChannel(interaction)) {
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!queue.deleted) {
|
if (!queue.deleted) {
|
||||||
|
queue.setRepeatMode(0);
|
||||||
queue.clear();
|
queue.clear();
|
||||||
queue.node.stop();
|
queue.node.stop();
|
||||||
logger.debug(
|
logger.debug(
|
||||||
|
|||||||
Reference in new issue
Block a user