Speed
Speed
DIAdiscord.js - Imagine an app
Created by Speed on 7/5/2023 in #djs-questions
adding role problem
here's the full error: interaction.guild.members.cache.get(match[1].toString()).roles.add(role) ^ TypeError: Cannot read properties of undefined (reading 'roles') at Client.<anonymous> (/home/runner/Slash-1-server/index.js:208:61) at Client.emit (node:events:390:28) at Client.emit (node:domain:475:12) at InteractionCreateAction.handle (/home/runner/Slash-1-server/node_modules/discord.js/src/client/actions/InteractionCreate.js:83:12) at Object.module.exports [as INTERACTION_CREATE] (/home/runner/Slash-1-server/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36) at WebSocketManager.handlePacket (/home/runner/Slash-1-server/node_modules/discord.js/src/client/websocket/WebSocketManager.js:346:31) at WebSocketShard.onPacket (/home/runner/Slash-1-server/node_modules/discord.js/src/client/websocket/WebSocketShard.js:493:22) at WebSocketShard.onMessage (/home/runner/Slash-1-server/node_modules/discord.js/src/client/websocket/WebSocketShard.js:327:10) at callListener (/home/runner/Slash-1-server/node_modules/ws/lib/event-target.js:290:14)
7 replies