beautiful embed
This commit is contained in:
parent
68a3e88a1e
commit
4bf63d014a
2 changed files with 25 additions and 9 deletions
|
@ -12,11 +12,17 @@ class CommandBlockedListener extends Listener {
|
||||||
console.log(`${message.author.username} was blocked from using ${command.id} because of ${reason}!`);
|
console.log(`${message.author.username} was blocked from using ${command.id} because of ${reason}!`);
|
||||||
let ownerMessage;
|
let ownerMessage;
|
||||||
let blacklistMessage;
|
let blacklistMessage;
|
||||||
|
let Embed = this.client.util.embed()
|
||||||
|
.setColor('RED')
|
||||||
|
.setTitle('Error')
|
||||||
|
.setDescription('Something blocked you');
|
||||||
|
|
||||||
switch(reason) {
|
switch(reason) {
|
||||||
case 'owner':
|
case 'owner':
|
||||||
ownerMessage = ['Nice try but you aren\'t the owner <a:memed:433320880135733248>', 'LOADING SUPER SECRET COMMAND <a:loadingmin:527579785212329984> Wait a minute... you aren\'t the owner!', 'uhm, how about no'];
|
ownerMessage = ['Nice try but you aren\'t the owner <a:memed:433320880135733248>', 'LOADING SUPER SECRET COMMAND <a:loadingmin:527579785212329984> Wait a minute... you aren\'t the owner!', 'uhm, how about no'];
|
||||||
ownerMessage = ownerMessage[Math.floor( Math.random() * ownerMessage.length )];
|
Embed.setTitle('You are not the owner.');
|
||||||
message.reply(ownerMessage);
|
Embed.setDescription(ownerMessage[Math.floor( Math.random() * ownerMessage.length )]);
|
||||||
|
message.reply(Embed);
|
||||||
break;
|
break;
|
||||||
case 'guild':
|
case 'guild':
|
||||||
message.reply('You can\'t use this command in a guild!');
|
message.reply('You can\'t use this command in a guild!');
|
||||||
|
@ -26,11 +32,14 @@ class CommandBlockedListener extends Listener {
|
||||||
break;
|
break;
|
||||||
case 'blacklist':
|
case 'blacklist':
|
||||||
blacklistMessage = ['bro... i think you are blacklisted.... OWNED!!!', 'You can\'t use this command because you have been blacklisted!',' you are blacklisted!!!1111!! be less naughty next time!', 'blacklisted,,,,,, lol owned bro'];
|
blacklistMessage = ['bro... i think you are blacklisted.... OWNED!!!', 'You can\'t use this command because you have been blacklisted!',' you are blacklisted!!!1111!! be less naughty next time!', 'blacklisted,,,,,, lol owned bro'];
|
||||||
blacklistMessage = blacklistMessage[Math.floor( Math.random() * blacklistMessage.length )];
|
Embed.setTitle('You are blacklisted.');
|
||||||
message.reply(blacklistMessage);
|
Embed.setDescription(blacklistMessage[Math.floor( Math.random() * blacklistMessage.length )]);
|
||||||
|
message.reply(Embed);
|
||||||
break;
|
break;
|
||||||
case 'serverblacklist':
|
case 'serverblacklist':
|
||||||
message.channel.send(`This server have been blacklisted... to appeal contact ${this.client.users.get(this.client.ownerID).username}#${this.client.users.get(this.client.ownerID).discriminator}, and now i will yeet out of here`);
|
Embed.setTitle('Server blacklisted.');
|
||||||
|
Embed.setDescription(`This server have been blacklisted... to appeal contact ${this.client.users.get(this.client.ownerID).username}#${this.client.users.get(this.client.ownerID).discriminator}, and now i will yeet out of here`);
|
||||||
|
message.channel.send(Embed);
|
||||||
message.guild.leave();
|
message.guild.leave();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,21 +9,28 @@ class missingPermissionsListener extends Listener {
|
||||||
}
|
}
|
||||||
|
|
||||||
async exec(message, command, type, missing) {
|
async exec(message, command, type, missing) {
|
||||||
|
let Embed = this.client.util.embed()
|
||||||
|
.setColor('RED')
|
||||||
|
.setTitle('Missing permission')
|
||||||
|
.setDescription(`Im missing the required permissions for the ${command.id} command!`)
|
||||||
|
.addField('Missing permission:', missing);
|
||||||
|
|
||||||
switch(type) {
|
switch(type) {
|
||||||
case 'client':
|
case 'client':
|
||||||
if (missing == 'SEND_MESSAGES') {
|
if (missing == 'SEND_MESSAGES') {
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
message.reply(`Im missing the required permissions for this command!, \`${missing}\``);
|
message.reply(Embed);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'user':
|
case 'user':
|
||||||
if (missing == 'SEND_MESSAGES') {
|
if (missing == 'SEND_MESSAGES') {
|
||||||
return message.author.send(`You are missing some permissions to use this command!, \`${missing}\``);
|
Embed.setDescription(`You are missing the required permissions for the ${command.id} command!`);
|
||||||
|
return message.author.send(Embed);
|
||||||
} else {
|
} else {
|
||||||
message.reply(`You are missing some permissions to use this command!, \`${missing}\``);
|
Embed.setDescription(`You are missing the required permissions for the ${command.id} command!`);
|
||||||
|
message.reply(Embed);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue