Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //cod para apagar.
- if (comando === "apagar") {
- if (!message.member.hasPermission('MANAGE_MESSAGES'))
- return message.channel.send("Você não tem permissão para isso!")
- const deleteCount = parseInt(args[0], 10);
- if (!deleteCount || deleteCount < 2 || deleteCount > 100)
- return message.reply("' Por favor, forneça um número entre 2 e 100 para o número de mensagens a serem excluídas' ");
- const fetched = await message.channel.fetchMessages({
- limit: deleteCount
- });
- message.channel.bulkDelete(fetched)
- .catch(error => message.reply(`Não foi possível deletar mensagens devido a: ${error}`));
- }
Advertisement
Add Comment
Please, Sign In to add comment