Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- client.on('message', message =>{
- if (message.content.startsWith(prefixz + "verify")) {
- if (message.member.roles.some(role => role.name === 'Verified')) {
- let num = Math.floor((Math.random() * 4783) + 10);
- var embedOne = new Discord.RichEmbed()
- .setColor('#32CD32')
- .addField('1 user was successfully verified. :white_check_mark:', 'Wanna take a look on the rules? Use -rules command')
- message.delete()
- message.channel.send(`Please type the following number : **${num}**`).then(m => {
- message.channel.awaitMessages(res => res.content == `${num}`, {
- max: 1,
- time: 60000,
- errors: ['time'],
- }).then(collected => {
- message.author.sendMessage(`Hey, ${message.author} you were automatically verified by me! You now have permissions to the main server channels. \n \nEnjoy! :wink:`);
- message.channel.sendEmbed(embedOne);
- message.member.addRole(message.guild.roles.find(c => c.name == "Verified"));
- }).catch(() => {
- m.edit(`You took to long to type the number.\nRe-type the command again if you want to verify yourself.`).then(m2 => m.delete(15000));
- });
- })
- }
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement