Commands fail to load / refresh if I require client
I'm messing around with discord.js and trying to build a music bot that plays songs off deezer. Though, I've run into an issue while trying to implement a queue system in my eplay function.
If I leave the line:
const client = require('../../src/index.js');
in my eplay.js function, when I refresh my commands using:
node .\src\deploy-commands.js
I find that I get the following error:
[WARNING] The command at C:\Users\Access Point\IdeaProjects\EthanMelodyVCS\commands\music\eplay.js is missing a required "data" or "execute" property.
I don't know how to implement a persistent queue without referencing the client, but I imagine it's failing because you can't reference the client without the bot being up (AKA running index.js first)
I've attached the file structure and the contents of a few functions.
eplay.js -
index.js -
4 Replies
- What are your intents?
GuildVoiceStates
is required to receive voice data!
- Show what dependencies you are using -- generateDependencyReport()
is exported from @discordjs/voice
.
- Try looking at common examples: https://github.com/discordjs/voice-examples.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!
- ✅
Marked as resolved by staffwe do not support TOS violations (which ytdl, and anything using youtube, is)
I mispoke
I'm actually working with deezer, and was wondering if we had general guidelines on creating a persistent queue, or if anyone had experience creating a persistent queue in discord.js
if you are working with an official streaming service you should use their APIs to download and play the song
distube and ytdl are by definition against terms of service as they facilitate the playback of songs the user does not have permissions to use
we uphold both community and dev tos here and will not provide support with this