if(command === "ticket") {
console.log(`ticket demmandé`)
message.channel.send(` **Nouveau Ticket** \r\n${message.author.username},voulez vous faire un nouveau ticket ?`)
.then(message => {
message.react('🆗')
client.on('messageReactionAdd', (reaction, user) => {
if (reaction.emoji.name === '🆗' && user.id !== client.user.id) {
message.author.createDM().then(channel => {
channel.send('nfugsfrbdi')
})
it is my code :
why this error ? :
(node:44928) UnhandledPromiseRejectionWarning: DiscordAPIError: Cannot send messages to this user
at item.request.gen.end (c:\Users\Arthur\Desktop\TICKET BOT\node_modules\discord.js\src\client\rest\RequestHandlers\Sequential.js:85:15)
at then (c:\Users\Arthur\Desktop\TICKET BOT\node_modules\snekfetch\src\index.js:215:21)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:44928) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
warning.js:18
(node:44928) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
please help me !