Errore with permission

Why it give me this error?
—————————————————————————————————
[ AntiCrash ] : Uncaught Exception/Catch
—————————————————————————————————
TypeError: Cannot read properties of undefined (reading 'permissions')
at Client.<anonymous> (/home/container/discord/events/interactionCreate.js:225:38)
at Client.emit (node:events:527:28)
at InteractionCreateAction.handle (/home/container/node_modules/discord.js/src/client/actions/InteractionCreate.js:81:12)
at Object.module.exports [as INTERACTION_CREATE] (/home/container/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36)
at WebSocketManager.handlePacket (/home/container/node_modules/discord.js/src/client/websocket/WebSocketManager.js:352:31)
at WebSocketShard.onPacket (/home/container/node_modules/discord.js/src/client/websocket/WebSocketShard.js:481:22)
at WebSocketShard.onMessage (/home/container/node_modules/discord.js/src/client/websocket/WebSocketShard.js:321:10)
at WebSocket.onMessage (/home/container/node_modules/ws/lib/event-target.js:199:18)
at WebSocket.emit (node:events:527:28)
at Receiver.receiverOnMessage (/home/container/node_modules/ws/lib/websocket.js:1178:20) uncaughtException undefined
—————————————————————————————————
[ AntiCrash ] : Uncaught Exception/Catch
—————————————————————————————————
TypeError: Cannot read properties of undefined (reading 'permissions')
at Client.<anonymous> (/home/container/discord/events/interactionCreate.js:225:38)
at Client.emit (node:events:527:28)
at InteractionCreateAction.handle (/home/container/node_modules/discord.js/src/client/actions/InteractionCreate.js:81:12)
at Object.module.exports [as INTERACTION_CREATE] (/home/container/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36)
at WebSocketManager.handlePacket (/home/container/node_modules/discord.js/src/client/websocket/WebSocketManager.js:352:31)
at WebSocketShard.onPacket (/home/container/node_modules/discord.js/src/client/websocket/WebSocketShard.js:481:22)
at WebSocketShard.onMessage (/home/container/node_modules/discord.js/src/client/websocket/WebSocketShard.js:321:10)
at WebSocket.onMessage (/home/container/node_modules/ws/lib/event-target.js:199:18)
at WebSocket.emit (node:events:527:28)
at Receiver.receiverOnMessage (/home/container/node_modules/ws/lib/websocket.js:1178:20) uncaughtException undefined
this is the code:
if (!interaction.guild.me.permissions.has(command.botPermissions || []))
if (!interaction.guild.me.permissions.has(command.botPermissions || []))
4 Replies
d.js docs
d.js docs3y ago
• What's your exact discord.js npm list discord.js and node node -v version? • Post the full error stack trace, not just the top part! • Show your code! • Explain what exactly your issue is. • Not a discord.js issue? Check out #useful-servers.
Dagan
Dagan3y ago
guild.members.me guild.me == deprecated
Killer Boss Original
ahhh thx
Dagan
Dagan3y ago
Youre welcome
Want results from more Discord servers?
Add your server