#main.js
1 messages · Page 1 of 1 (latest)
node:events:496
throw er; // Unhandled 'error' event
^
TypeError: Cannot read properties of undefined (reading 'delete')
at module.exports (C:\Users\willi\Desktop\RadioBotALL\RadioBotAdmin\events\Discord\interactionCreate.js:11:185)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Emitted 'error' event on Client instance at:
at emitUnhandledRejectionOrErr (node:events:401:10)
at process.processTicksAndRejections (node:internal/process/task_queues:84:21)
(or on cmd
C:\Users\willi\Desktop\RadioBotALL\RadioBotAdmin\node_modules\discord-player\dist\index.js:322
const exception = new err.type(err.createError(...args));
^
ERR_INVALID_ARG_TYPE: [ERR_INVALID_ARG_TYPE] Expected null to be "string", received "object"
at Proxy.<anonymous> (C:\Users\willi\Desktop\RadioBotALL\RadioBotAdmin\node_modules\discord-player\dist\index.js:322:25)
at QueryResolver.preResolve (C:\Users\willi\Desktop\RadioBotALL\RadioBotAdmin\node_modules\discord-player\dist\index.js:2040:24)
at _Player.search (C:\Users\willi\Desktop\RadioBotALL\RadioBotAdmin\node_modules\discord-player\dist\index.js:5246:44)
at Object.execute (C:\Users\willi\Desktop\RadioBotALL\RadioBotAdmin\commands\music\play.js:21:34)
at module.exports (C:\Users\willi\Desktop\RadioBotALL\RadioBotAdmin\events\Discord\interactionCreate.js:18:17)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Node.js v20.12.2
a moderator will come and help you soon

Thanks
well i guess issue is
client.commands = new Collection();
is collection used for registering commands
and in error handler wrong collection used ( client.slash )
https://github.com/ZerioDev/Music-bot/blob/master/events/Discord/interactionCreate.js#L11
and for 2nd error i guess args are supposed to be string but they are passing object
( i would have tested created pull req but bit busy )
P.S i didn't test anything i just looked at code and thought it might be the issue based on error
I Will try later
C:\Users\willi\Desktop\RadioBotALL\RadioBotAdmin\node_modules\discord-player\dist\index.js:324
const exception = new err.type(err.createError(...args));
^
ERR_INVALID_ARG_TYPE [TypeError]: [ERR_INVALID_ARG_TYPE] Expected null to be "string", received "object"
at Proxy.<anonymous> (C:\Users\willi\Desktop\RadioBotALL\RadioBotAdmin\node_modules\discord-player\dist\index.js:324:25)
at QueryResolver.preResolve (C:\Users\willi\Desktop\RadioBotALL\RadioBotAdmin\node_modules\discord-player\dist\index.js:2056:24)
at _Player.search (C:\Users\willi\Desktop\RadioBotALL\RadioBotAdmin\node_modules\discord-player\dist\index.js:5652:44)
at Object.execute (C:\Users\willi\Desktop\RadioBotALL\RadioBotAdmin\commands\music\play.js:21:34)
at module.exports (C:\Users\willi\Desktop\RadioBotALL\RadioBotAdmin\events\Discord\interactionCreate.js:40:17)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Can you run: node -v
C:\Users\willi\Desktop\RadioBotALL\RadioBotAdmin>node -v
v22.1.0
Try node 18.2x.xx
ok
C:\Users\willi\Desktop\RadioBotALL\RadioBotAdmin>yarn install
yarn install v1.22.22
info No lockfile found.
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning Workspaces can only be enabled in private projects.
[4/4] Building fresh packages...
success Saved lockfile.
Done in 12.70s.
okay yarn install ( succes)
but
C:\Users\willi\Desktop\RadioBotALL\RadioBotAdmin\node_modules\discord-player\dist\index.js:324
const exception = new err.type(err.createError(...args));
^
ERR_INVALID_ARG_TYPE [TypeError]: [ERR_INVALID_ARG_TYPE] Expected null to be "string", received "object"
at Proxy.<anonymous> (C:\Users\willi\Desktop\RadioBotALL\RadioBotAdmin\node_modules\discord-player\dist\index.js:324:25)
at QueryResolver.preResolve (C:\Users\willi\Desktop\RadioBotALL\RadioBotAdmin\node_modules\discord-player\dist\index.js:2056:24)
at _Player.search (C:\Users\willi\Desktop\RadioBotALL\RadioBotAdmin\node_modules\discord-player\dist\index.js:5652:44)
at Object.execute (C:\Users\willi\Desktop\RadioBotALL\RadioBotAdmin\commands\music\play.js:21:34)
at module.exports (C:\Users\willi\Desktop\RadioBotALL\RadioBotAdmin\events\Discord\interactionCreate.js:40:17)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Node.js v18.20.2
/play or info not work just /ping
all good music work
@valid trouthow did u make it work, same issue