mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-03 06:28:53 +00:00
Update .gitignore, deleted unused file
This commit is contained in:
1 parent
7477621d68
commit
d0d98980c0
2 files changed
+1
-23
No files matched your search
+1
-1
@@ -1,2 +1,2 @@
|
||||
/node_modules
|
||||
config.json
|
||||
config.json*
|
||||
@@ -1,22 +0,0 @@
|
||||
async function execute(interaction) {
|
||||
const channel = interaction.member.voice.channel;
|
||||
if (!channel) return interaction.reply('You are not connected to a voice channel!'); // make sure we have a voice channel
|
||||
const query = interaction.options.getString('query', true); // we need input/query to play
|
||||
|
||||
// let's defer the interaction as things can take time to process
|
||||
await interaction.deferReply();
|
||||
|
||||
try {
|
||||
const { track } = await player.play(channel, query, {
|
||||
nodeOptions: {
|
||||
// nodeOptions are the options for guild node (aka your queue in simple word)
|
||||
metadata: interaction // we can access this metadata object using queue.metadata later on
|
||||
}
|
||||
});
|
||||
|
||||
return interaction.followUp(`**${track.title}** enqueued!`);
|
||||
} catch (e) {
|
||||
// let's return error if something failed
|
||||
return interaction.followUp(`Something went wrong: ${e}`);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user