Finally decided on a help command I like

This commit is contained in:
Emily 2020-04-12 19:15:31 +10:00
parent aedce9fc34
commit bfde321b3e
10 changed files with 90 additions and 70 deletions

View file

@ -1,44 +1,41 @@
exports.conf = {
enabled: true,
guildOnly: false,
aliases: [],
permLevel: 'User',
requiredPerms: []
};
enabled: true,
guildOnly: false,
aliases: ['enlarge'],
permLevel: 'User',
requiredPerms: []
}
exports.help = {
name: 'emoji',
category: 'Utility',
description: 'Enlarges and links an custom emoji',
usage: 'emoji [emoji]',
params: '`[emoji] - Custom emoji you want to enlarge.'
};
name: 'emoji',
category: 'Utility',
description: 'Enlarges a custom emoji.',
usage: 'emoji [emoji]',
parameters: '`[emoji] - Custom emoji you want to enlarge'
}
exports.run = async (client, message, args) => {
if(!args[0]) {
return message.channel.send(`You need to specify a custom emoji. Usage: \`${client.commands.get(`emoji`).help.usage}\``)
};
var ID;
var format = '.png'
var string = args[0].replace(/\D/g,'');
if(args[0].charAt(1) == 'a' && args[0].charAt(2) == ':') {
format = '.gif'
};
if(string.length > 18) {
ID = string.slice(string.length - 18);
} else {
ID = string;
};
if(!ID) {
return message.channel.send(`<:error:466995152976871434> Invalid emoji. This command only works with custom emojis.`)
};
message.channel.send('https://cdn.discordapp.com/emojis/' + ID + format)
};
if (!args[0]) {
return message.channel.send(client.userError(exports, 'Missing argument, the `emoji` argument is required!'))
};
var ID
var format = '.png'
var string = args[0].replace(/\D/g, '')
if (args[0].charAt(1) === 'a' && args[0].charAt(2) === ':') {
format = '.gif'
};
if (string.length > 18) {
ID = string.slice(string.length - 18)
} else {
ID = string
};
if (!ID) {
return message.channel.send('<:error:466995152976871434> This command only works with custom emojis, sorry ;~;')
}
message.channel.send('https://cdn.discordapp.com/emojis/' + ID + format)
}