check for apikey

This commit is contained in:
JonnyBro 2021-12-18 19:43:06 +05:00
parent b6869fbba1
commit b7fa913bd5
2 changed files with 2 additions and 2 deletions

View file

@ -18,7 +18,7 @@ class Joke extends Command {
}
async run (message, args, data) {
// if (!this.client.config.apiKeys.blagueXYZ) return message.error("misc:COMMAND_DISABLED");
if (!this.client.config.apiKeys.blagueXYZ) return message.error("misc:COMMAND_DISABLED");
// const joke = await this.client.joker.randomJoke(data.guild.language.substr(0, 2));
const joke = await this.client.joker.randomJoke("en");

View file

@ -67,7 +67,7 @@ class Help extends Command {
.setFooter(data.config.embed.footer);
categories.sort().forEach((cat) => {
const tCommands = commands.filter((cmd) => cmd.help.category === cat);
embed.addField(emojis.categories[cat.toLowerCase()]+" "+cat+" - ("+tCommands.size+")", tCommands.map((cmd) => "`"+cmd.help.name+"`").join(", "));
embed.addField(`${emojis.categories[cat.toLowerCase()]} ${cat} - (${tCommands.size})`, `${tCommands.map((cmd) => `${cmd.help.name}`).join(", ")}`);
});
if (message.guild) {
if (data.guild.customCommands.length > 0) embed.addField(emojis.categories.custom+" "+message.guild.name+" | "+message.translate("general/help:CUSTOM_COMMANDS")+" - ("+data.guild.customCommands.length+")", data.guild.customCommands.map((cmd) => "`"+cmd.name+"`").join(", "));