TypeError: Cannot read property 'send' of undefined
at callback (C:\Users\DELL\Desktop\26-Ticketing-System\commands\ticket.js:37:13)
at Client. (C:\Users\DELL\Desktop\26-Ticketing-System\commands\command-base.js:133:9)
at Client.emit (events.js:387:35)
at MessageCreateAction.handle (C:\Users\DELL\Desktop\26-Ticketing-System\node_modules\discord.js\src\client\actions\MessageCreate.js:31:14)
at Object.module.exports [as MESSAGE_CREATE] (C:\Users\DELL\Desktop\26-Ticketing-System\node_modules\discord.js\src\client\websocket\handlers\MESSAGE_CREATE.js:4:32)
at WebSocketManager.handlePacket (C:\Users\DELL\Desktop\26-Ticketing-System\node_modules\discord.js\src\client\websocket\WebSocketManager.js:384:31)
at WebSocketShard.onPacket (C:\Users\DELL\Desktop\26-Ticketing-System\node_modules\discord.js\src\client\websocket\WebSocketShard.js:444:22)
at WebSocketShard.onMessage (C:\Users\DELL\Desktop\26-Ticketing-System\node_modules\discord.js\src\client\websocket\WebSocketShard.js:301:10)
at WebSocket.onMessage (C:\Users\DELL\Desktop\26-Ticketing-System\node_modules\ws\lib\event-target.js:132:16)
at WebSocket.emit (events.js:375:28)
here is code: registerEvent(client)
Error:
C:\Users\DELL\Desktop\26-Ticketing-System\commands\ticket.js:37 channel.send( ^
TypeError: Cannot read property 'send' of undefined at callback (C:\Users\DELL\Desktop\26-Ticketing-System\commands\ticket.js:37:13) at Client. (C:\Users\DELL\Desktop\26-Ticketing-System\commands\command-base.js:133:9)
at Client.emit (events.js:387:35)
at MessageCreateAction.handle (C:\Users\DELL\Desktop\26-Ticketing-System\node_modules\discord.js\src\client\actions\MessageCreate.js:31:14)
at Object.module.exports [as MESSAGE_CREATE] (C:\Users\DELL\Desktop\26-Ticketing-System\node_modules\discord.js\src\client\websocket\handlers\MESSAGE_CREATE.js:4:32)
at WebSocketManager.handlePacket (C:\Users\DELL\Desktop\26-Ticketing-System\node_modules\discord.js\src\client\websocket\WebSocketManager.js:384:31) at WebSocketShard.onPacket (C:\Users\DELL\Desktop\26-Ticketing-System\node_modules\discord.js\src\client\websocket\WebSocketShard.js:444:22) at WebSocketShard.onMessage (C:\Users\DELL\Desktop\26-Ticketing-System\node_modules\discord.js\src\client\websocket\WebSocketShard.js:301:10) at WebSocket.onMessage (C:\Users\DELL\Desktop\26-Ticketing-System\node_modules\ws\lib\event-target.js:132:16) at WebSocket.emit (events.js:375:28)