I believe that I had a working line before that would check for a users role called Motion Design and then if they had it continue but if they didnt have it send a message to a channel. It always seems to send the message to the channel even if they have the role. The ****** is the line that should be checking for the role.
I have tried renaming the role and changing in the code but nothing is working.
if (messageReaction.emoji.name === reactions.success) {
let client1 = messageReaction.users
const notbot = messageReaction.users.filter(clientuser => clientuser !== client.user).first();
await messageReaction.remove(notbot);
//check if they have role id
******** if(!message.member.roles.find(r => r.name === "Motion Design")) return client.channels.get(`${ticketchat}`).send(`${notbot} You do not have the requested role for that ticket`);
const defbot = messageReaction.users.filter(clientuser => clientuser == client.user).first();
await messageReaction.remove(defbot);
let web1 = new Discord.RichEmbed()
.setDescription(`This commission has been claimed by ${notbot} .`)
.setColor("#15f153")
.addField("Client", `${message.author} with ID: ${message.author.id}`)
.addField("Budget", `${budget}`)
.addField("Time", message.createdAt)
.addField("Budget", `${budget}`)
.addField("Requested Freelancer",`<@&${motionDesign}>`)
let tickets = message.guild.channels.find('name', "tickets")
if(!tickets) return message.channel.send(`${message.author} Can't find tickets channel.`)
message.delete().catch(O_o=>{});
message.author.send(`Freelancer ${notbot} has taken your ticket. ${message.author}`);