Merge pull request #20 from real2two/patch-11
Changed all RichEmbed to MessageEmbed.
This commit is contained in:
1 file changed
+6
-6
+6
-6
@@ -16,31 +16,31 @@ exports.run = async (bot, message, args) => {
|
|||||||
|
|
||||||
let staffGroup = message.guild.roles.find(staffRole => staffRole.name === supportbot.StaffRole)
|
let staffGroup = message.guild.roles.find(staffRole => staffRole.name === supportbot.StaffRole)
|
||||||
|
|
||||||
const rolemissing = new Discord.RichEmbed()
|
const rolemissing = new Discord.MessageEmbed()
|
||||||
.setDescription(`:x: Looks like this server doesn't have the role **${supportbot.StaffRole}**`)
|
.setDescription(`:x: Looks like this server doesn't have the role **${supportbot.StaffRole}**`)
|
||||||
.setColor(supportbot.EmbedColour)
|
.setColor(supportbot.EmbedColour)
|
||||||
if (!staffGroup) return message.reply({embed: rolemissing});
|
if (!staffGroup) return message.reply({embed: rolemissing});
|
||||||
|
|
||||||
const donothaverole = new Discord.RichEmbed()
|
const donothaverole = new Discord.MessageEmbed()
|
||||||
.setDescription(`:x: Sorry! You cannot use this command with the role **${supportbot.StaffRole}**`)
|
.setDescription(`:x: Sorry! You cannot use this command with the role **${supportbot.StaffRole}**`)
|
||||||
.setColor(supportbot.EmbedColour)
|
.setColor(supportbot.EmbedColour)
|
||||||
if (!message.member.roles.has(staffGroup.id)) return message.reply({embed: donothaverole});
|
if (!message.member.roles.has(staffGroup.id)) return message.reply({embed: donothaverole});
|
||||||
|
|
||||||
const outsideticket = new Discord.RichEmbed()
|
const outsideticket = new Discord.MessageEmbed()
|
||||||
.setDescription(`:x: Cannot use this command becase you are outside a ticket channel.`)
|
.setDescription(`:x: Cannot use this command becase you are outside a ticket channel.`)
|
||||||
.setColor(supportbot.EmbedColour)
|
.setColor(supportbot.EmbedColour)
|
||||||
if (!message.channel.name.startsWith(`${supportbot.Ticket_Channel_Name}-`)) return message.channel.send({embed: outsideticket});
|
if (!message.channel.name.startsWith(`${supportbot.Ticket_Channel_Name}-`)) return message.channel.send({embed: outsideticket});
|
||||||
|
|
||||||
let rUser = message.guild.member(message.mentions.users.first() || message.guild.members.get(args[0]));
|
let rUser = message.guild.member(message.mentions.users.first() || message.guild.members.get(args[0]));
|
||||||
|
|
||||||
const cantfinduser = new Discord.RichEmbed()
|
const cantfinduser = new Discord.MessageEmbed()
|
||||||
.setDescription(`:x: Hmm! Does that user exist? I cannot find the user.`)
|
.setDescription(`:x: Hmm! Does that user exist? I cannot find the user.`)
|
||||||
.setColor(supportbot.EmbedColour)
|
.setColor(supportbot.EmbedColour)
|
||||||
if(!rUser) return message.channel.send({embed: cantfinduser});
|
if(!rUser) return message.channel.send({embed: cantfinduser});
|
||||||
|
|
||||||
const channel = message.guild.channels.find(channel => channel.name === message.channel.name);
|
const channel = message.guild.channels.find(channel => channel.name === message.channel.name);
|
||||||
|
|
||||||
const cantfindchannel = new Discord.RichEmbed()
|
const cantfindchannel = new Discord.MessageEmbed()
|
||||||
.setDescription(`:x: Hmm! Does that ticket exist? I cannot find the ticket channel.`)
|
.setDescription(`:x: Hmm! Does that ticket exist? I cannot find the ticket channel.`)
|
||||||
.setColor(supportbot.EmbedColour)
|
.setColor(supportbot.EmbedColour)
|
||||||
if(!channel) return message.channel.send({embed: cantfindchannel});
|
if(!channel) return message.channel.send({embed: cantfindchannel});
|
||||||
@@ -48,7 +48,7 @@ exports.run = async (bot, message, args) => {
|
|||||||
|
|
||||||
message.channel.overwritePermissions(rUser, { READ_MESSAGES: false, SEND_MESSAGES: false });
|
message.channel.overwritePermissions(rUser, { READ_MESSAGES: false, SEND_MESSAGES: false });
|
||||||
|
|
||||||
const useradded = new Discord.RichEmbed()
|
const useradded = new Discord.MessageEmbed()
|
||||||
.setColor(supportbot.EmbedColour)
|
.setColor(supportbot.EmbedColour)
|
||||||
.setTitle("User Removed")
|
.setTitle("User Removed")
|
||||||
.setDescription(`👍 ${rUser} has been removed from this ticket`)
|
.setDescription(`👍 ${rUser} has been removed from this ticket`)
|
||||||
|
|||||||
Reference in new issue
Block a user