woomy/src/commands/identity.js

37 lines
1.2 KiB
JavaScript
Raw Normal View History

2020-03-20 01:08:52 +00:00
const identities = require ("../../resources/other/identities.json");
exports.run = async (client, message, args) => {
var output = "";
if(!args[0]) {
for (var key of Object.keys(identities)) {
output += `${key}, `
};
return message.channel.send(`__**Identities**__\n${output.slice(0, -2)}`);
2020-03-22 11:13:41 +00:00
} else {
if(args.join(" ").toLowerCase() == "attack helicopter" || args.join(" ").toLowerCase() == "apache attack helicopter" || args.join(" ").toLowerCase() == "apache") {
return message.channel.send({
files: [new Discord.MessageAttachment("./resources/images/attackhelicopter.jpg")]
});
}
output = identities[args.join(" ").toLowerCase()];
2020-03-20 01:08:52 +00:00
if(!output) {
return message.channel.send("<:error:466995152976871434> No results for that query.");
};
2020-03-26 04:31:32 +00:00
return message.channel.send(`__**${output.name.toProperCase()}**__\n${output.description}`);
2020-03-20 01:08:52 +00:00
};
};
exports.conf = {
enabled: true,
guildOnly: false,
2020-03-22 11:13:41 +00:00
aliases: ["identities"],
2020-03-20 01:08:52 +00:00
permLevel: "User",
requiredPerms: []
};
exports.help = {
name: "identity",
category: "Fun",
description: "Gives you information about the specified identity.",
usage: "identity [identity]"
};