#Commands fail to load / refresh if I require client

5 messages · Page 1 of 1 (latest)

dense veldt
#

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 -

minor tangleBOT
#
  • 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 staff
velvet frost
#

we do not support TOS violations (which ytdl, and anything using youtube, is)

dense veldt
#

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