Split commands into subdirectories
* Move command files into directories * Edit relative paths * Update gitignore * Finish support for commands in subdir * Split up getCommandFiles into own function * Add support for subdirs on help command
This commit is contained in:
parent
8993eeaf7a
commit
e7cdd425d1
21 changed files with 55 additions and 35 deletions
27
commands/misc/emoji.js
Normal file
27
commands/misc/emoji.js
Normal file
|
@ -0,0 +1,27 @@
|
|||
module.exports = {
|
||||
name: 'e',
|
||||
description: 'Returns emoji url',
|
||||
moreHelp: ["Works with both animated and static emojis"],
|
||||
execute({ message, args }) {
|
||||
let emoji = args.join(` `);
|
||||
|
||||
if (!emoji) {
|
||||
message.channel.send("no emoji");
|
||||
return;
|
||||
}
|
||||
let extension = ".png"
|
||||
if (args[0].charAt(1) == "a") {
|
||||
extension = ".gif";
|
||||
}
|
||||
|
||||
|
||||
let num = emoji.split(":")[2];
|
||||
try {
|
||||
num = num.slice(0, -1);
|
||||
} catch (e) {
|
||||
message.channel.send("There was an error.");
|
||||
return;
|
||||
}
|
||||
message.channel.send("https://cdn.discordapp.com/emojis/" + num + extension);
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue