2020-12-15 01:44:28 +00:00
|
|
|
import {MessageEmbed} from "discord.js";
|
|
|
|
import Command from "../../core/command";
|
|
|
|
import {CommonLibrary} from "../../core/lib";
|
2020-10-20 12:04:13 +00:00
|
|
|
|
|
|
|
export default new Command({
|
2020-12-15 01:44:28 +00:00
|
|
|
description: "Send the specified emote.",
|
|
|
|
run: "Please provide a command name.",
|
|
|
|
any: new Command({
|
|
|
|
description: "The emote to send.",
|
|
|
|
usage: "<emote>",
|
|
|
|
async run($: CommonLibrary): Promise<any> {
|
|
|
|
const search = $.args[0].toLowerCase();
|
2020-12-15 07:56:09 +00:00
|
|
|
const emote = $.client.emojis.cache.find((emote) => emote.name.toLowerCase().includes(search));
|
2020-12-15 01:44:28 +00:00
|
|
|
if (!emote) return $.channel.send("That's not a valid emote name!");
|
|
|
|
$.message.delete();
|
|
|
|
$.channel.send(`${emote}`);
|
|
|
|
}
|
|
|
|
})
|
2020-10-20 12:04:13 +00:00
|
|
|
});
|