client.on('messageCreate', async(msg) => { function isValidURL(string) { var res = string.match(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[az]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g); return (res !== null) }; var testContent = msg.content; if(isValidURL(testContent) && msg.channel.id !== '993037263611109437' && msg.channel.id !== '993582363734970489' && !msg.member.hasPermission('MANAGE_MESSAGES')) { msg.delete(); msg.reply('you cannot send links in this server!') } if(msg.content.includes('<@!599364237797883935>')) { msg.delete() return msg.reply('you cannot ping this user') } }); DeprecationWarning: The message event is deprecated. Use messageCreate instead
Sigo recibiendo este error cuando me @yo mismo o pongo un enlace de invitación