Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I Am Getting Error #26

Open
Prasadnaw opened this issue Aug 8, 2021 · 1 comment
Open

I Am Getting Error #26

Prasadnaw opened this issue Aug 8, 2021 · 1 comment

Comments

@Prasadnaw
Copy link

here is code:
registerEvent(client)

const channel = guild.channels.cache.get(channelId)
channel.send(
    `A new ticketh has been creaated by <@${member.id}>

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)

@andyforprez
Copy link

You forgot to close the brackets with )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants