saiteja-madha / discord-js-bot

🤖 Multipurpose discord bot built using discord.js v14 with moderation, music, ticketing, translation, and much more
https://strangedocs.hostz.me
Apache License 2.0
665 stars 682 forks source link

Command /play #246

Open ghost opened 1 year ago

ghost commented 1 year ago

Describe the bug When i try type /play query:electro house (or another title) giving me error on console: messageRun: Cannot read properties of undefined (reading 'track') interactionRun: Cannot read properties of undefined (reading 'track')

FROM DISCORD: TypeError: Cannot read properties of undefined (reading 'track') at new Song (/home/discordamp/discord-js-bot/node_modules/@lavaclient/queue/dist/lib/Song.js:7:64) at /home/discordamp/discord-js-bot/node_modules/@lavaclient/queue/dist/lib/Queue.js:100:157 at Array.map () at Queue.add (/home/discordamp/discord-js-bot/node_modules/@lavaclient/queue/dist/lib/Queue.js:100:108) at play (/home/discordamp/discord-js-bot/src/commands/music/play.js:198:16) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async Object.messageRun (/home/discordamp/discord-js-bot/src/commands/music/play.js:39:22) at async Object.handlePrefixCommand (/home/discordamp/discord-js-bot/src/handlers/command.js:70:7)

TypeError: Cannot read properties of undefined (reading 'track') at new Song (/home/discordamp/discord-js-bot/node_modules/@lavaclient/queue/dist/lib/Song.js:7:64) at /home/discordamp/discord-js-bot/node_modules/@lavaclient/queue/dist/lib/Queue.js:100:157 at Array.map () at Queue.add (/home/discordamp/discord-js-bot/node_modules/@lavaclient/queue/dist/lib/Queue.js:100:108) at play (/home/discordamp/discord-js-bot/src/commands/music/play.js:198:16) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async Object.interactionRun (/home/discordamp/discord-js-bot/src/commands/music/play.js:45:22) at async Object.handleSlashCommand (/home/discordamp/discord-js-bot/src/handlers/command.js:140:7) at async module.exports (/home/discordamp/discord-js-bot/src/events/interactions/interactionCreate.js:18:5)

Jonathan5508 commented 1 year ago

@DesignAny Hello! Can you tell me exactly what you did to get this error? I cannot seem to reproduce it.

ghost commented 1 year ago

I wanna say, when i try play with url that''s work great

message: /play query: rura mariana

Video: https://user-images.githubusercontent.com/89824974/202252441-d6612f73-039e-4741-b579-cd1bb5e16cd7.mp4

Jonathan5508 commented 1 year ago

I found that it was working perfectly with titles.

ghost commented 1 year ago

i get new error: but itd what's command push

interactionRun: Cannot destructure property 'title' of 'player.queue.current' as it is null. TypeError: Cannot destructure property 'title' of 'player.queue.current' as it is null. at skip (/home/discordamp/discord-js-bot/src/commands/music/skip.js:35:11) at Object.interactionRun (/home/discordamp/discord-js-bot/src/commands/music/skip.js:25:22) at Object.handleSlashCommand (/home/discordamp/discord-js-bot/src/handlers/command.js:140:17) at runMicrotasks () at processTicksAndRejections (node:internal/process/task_queues:96:5) at async module.exports (/home/discordamp/discord-js-bot/src/events/interactions/interactionCreate.js:18:5)