Merge pull request #105 from mariusbegby/fix

3.1 fixes
This commit is contained in:
Marius Begby authored and GitHub committed 2023-07-23 13:57:34 +02:00
commit 780bcd6196
2 files changed
+11 -6

No files matched your search

+10 -6
View File
@@ -29,12 +29,16 @@ module.exports = {
const searchResults = await player.search(query);
logger.debug(`[Shard ${interaction.guild.shardId}] Autocomplete search responded for query: ${query}`);
return interaction.respond(
searchResults.tracks.slice(0, 5).map((track) => ({
name: `${track.title} [Author: ${track.author}]`,
value: track.url
}))
);
let response = searchResults.tracks.slice(0, 5).map((track) => ({
name:
`${track.title} [Author: ${track.author}]`.length > 100
? `${track.title}`.slice(0, 100)
: `${track.title} [Author: ${track.author}]`,
value: track.url
}));
return interaction.respond(response);
},
execute: async ({ interaction }) => {
if (await notInVoiceChannel(interaction)) {
+1
View File
@@ -34,6 +34,7 @@ module.exports = {
}
if (!queue.deleted) {
queue.setRepeatMode(0);
queue.clear();
queue.node.stop();
logger.debug(