Browse Source

Use promise in rolerequest function

master
Abheek Dhawan 4 years ago
parent
commit
15ead53811
  1. 3
      index.js

3
index.js

@ -302,7 +302,7 @@ async function roleRequest(message) {
return;
}
const verificationMessage = message.channel.send(`<@${message.author.id}> would like the **${role}** role. Are they worthy?`);
const verificationMessage = message.channel.send(`<@${message.author.id}> would like the **${role}** role. Are they worthy?`).then(message => {
message.react('👍');
message.react('👎');
const filter = (reaction, user) => {
@ -319,6 +319,7 @@ async function roleRequest(message) {
}
}).catch(verificationMessage => { verificationMessage.edit("TIMEOUT") });
});
}).catch(console.error);
}
async function bulkDelete(message) {

Loading…
Cancel
Save