auto notification to a channel

node:events:491 throw er; // Unhandled 'error' event ^ TypeError: Cannot read properties of undefined (reading 'id') at InteractionCollector.filter (/media/rachit/RAVEN/projectAlpha/space/main.js:116:85) at InteractionCollector.handleCollect (/media/rachit/RAVEN/projectAlpha/node_modules/discord.js/src/structures/interfaces/Collector.js:124:39) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) Emitted 'error' event on Client instance at: at emitUnhandledRejectionOrErr (node:events:394:10) at process.processTicksAndRejections (node:internal/process/task_queues:84:21) Node.js v18.13.0 I am trying to make a notification bot which will send embeds with button interaction source code: https://codefile.io/f/NFp1YXfsgM
Codefile.io
notification bot — Codefile
Create collaborative code files online for your technical interviews, pair programming, teaching, etc.
11 Replies
d.js toolkit
d.js toolkit12mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by OP
The MASTER
The MASTEROP12mo ago
so when ever I interact with button in discord app it generates the above mentioned error and give the interaction failed error in the app
jay
jay12mo ago
a channel has no such property as author
The MASTER
The MASTEROP12mo ago
should I remove filter then??
jay
jay12mo ago
no just channel.author
The MASTER
The MASTEROP12mo ago
how can I make that interaction visible only to the person who pressed it?
jay
jay12mo ago
set it ephemeral
The MASTER
The MASTEROP12mo ago
I have one last doubt can you tell me the syntax to send normal message with embeds with ephermeral:true
jay
jay12mo ago
just pass in content and embeds unless you mean something else thonkconga
The MASTER
The MASTEROP12mo ago
but when i am passing like this only text part is shown not embeds channel.send("texts",{embed:embed})
jay
jay12mo ago
embeds* which is also an array also it should ideally be content: and embeds:
Want results from more Discord servers?
Add your server