i couldnt understand this error
TypeError: Cannot read properties of undefined (reading 'send')
at Client.<anonymous> (/home/container/index.js:1333:15)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
/home/container/node_modules/discord.js/src/rest/RequestHandler.js:350
throw new DiscordAPIError(data, res.status, request);
^
DiscordAPIError: Unknown interaction
at RequestHandler.execute (/home/container/node_modules/discord.js/src/rest/RequestHandler.js:350:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async RequestHandler.push (/home/container/node_modules/discord.js/src/rest/RequestHandler.js:51:14)
at async ModalSubmitInteraction.reply (/home/container/node_modules/discord.js/src/structures/interfaces/InteractionResponses.js:103:5) {
method: 'post',
path: '/interactions/1278307386788155435/aW50ZXJhY3Rpb246MTI3ODMwNzM4Njc4ODE1NTQzNTp6M21ETFNuZ0VHRTdLeFgzSUZpM051cE9PdFI0QUhETEpRN28xR09oQ1pnRnVqYUVVT2VtdDVyUXJUS2pQQUtORmNtT2RzVXBFTDlaNVJLUzkxZFhlMW1SUU5SbmxKSzV3VWZlek1pTUp5OEtiRjBoNDNucnFuZjFHTUc4Q244WQ/callback',
code: 10062,
httpStatus: 404,
requestData: {
json: {
type: 4,
data: {
content: ' توكن حسابك خطأ , انت يجب ان تدخل توكن صحيح لحسابك , لو مش عارف تجيب توكن حسابك ازاى اكتب كلمة',
tts: false,
nonce: undefined,
embeds: undefined,
components: undefined,
username: undefined,
avatar_url: undefined,
allowed_mentions: undefined,
flags: undefined,
message_reference: undefined,
attachments: undefined,
sticker_ids: undefined,
thread_name: undefined
}
},
files: []
}
}
Node.js v21.7.3
await channel.send({content :
** الشخص الوضع التوكن ${member} \n توكن حسابك هو : ${tokennnno}**
})3 Replies
- 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!await channel.send({content :
** الشخص الوضع التوكن ${member} \n توكن حسابك هو : ${tokennnno}**
})Your channel variable has a value of undefined