Skip to main content

TypeError: options.getMember is not a function

so I have been coding the ban command, just finished it and I started getting this error. I have no idea how to fix it even though searching through the internet for a while now. Can someone help me with this one?

This is the error I am getting:

/Users/Aplex/Documents/Aplel/Commands/Moderation/ban.js:45
        const Target = options.getMember("target");
                               ^

TypeError: options.getMember is not a function
    at Object.execute (/Users/Aplex/Documents/Aplel/Commands/Moderation/ban.js:45:32)
    at Object.execute (/Users/Aplex/Documents/Aplel/Events/Interaction/interactionCreate.js:21:21)
    at Client.<anonymous> (/Users/Aplex/Documents/Aplel/Structures/Handlers/Events.js:18:54)
    at Client.emit (node:events:538:35)
    at InteractionCreateAction.handle (/Users/Aplex/Documents/Aplel/node_modules/discord.js/src/client/actions/InteractionCreate.js:74:12)
    at Object.module.exports [as INTERACTION_CREATE] (/Users/Aplex/Documents/Aplel/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36)
    at WebSocketManager.handlePacket (/Users/Aplex/Documents/Aplel/node_modules/discord.js/src/client/websocket/WebSocketManager.js:351:31)
    at WebSocketShard.onPacket (/Users/Aplex/Documents/Aplel/node_modules/discord.js/src/client/websocket/WebSocketShard.js:444:22)
    at WebSocketShard.onMessage (/Users/Aplex/Documents/Aplel/node_modules/discord.js/src/client/websocket/WebSocketShard.js:301:10)
    at WebSocket.onMessage (/Users/Aplex/Documents/Aplel/node_modules/ws/lib/event-target.js:199:18)
Via Active questions tagged javascript - Stack Overflow https://ift.tt/EnORl9u

Comments