From 0c6e018580f0b956d7493b84b4114fc1ca643c1c Mon Sep 17 00:00:00 2001 From: mudkipscience Date: Wed, 17 Jun 2020 18:13:33 +1000 Subject: [PATCH] added wag --- src/commands/wag.js | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/commands/wag.js diff --git a/src/commands/wag.js b/src/commands/wag.js new file mode 100644 index 0000000..77e5360 --- /dev/null +++ b/src/commands/wag.js @@ -0,0 +1,28 @@ +const fetch = require("node-fetch") +exports.run = async (client, message, args) => { + message.channel.startTyping(); + try{ + fetch(`https://purrbot.site/api/img/sfw/tail/gif/`) + .then(res => res.json()) + .then(json => message.channel.send(json.link)); + message.channel.stopTyping(); + } catch(err) { + message.channel.send(`<:error:466995152976871434> An error has occurred: ${err}`); + message.channel.stopTyping(); + }; +}; + +exports.conf = { + enabled: true, + guildOnly: false, + aliases: [], + permLevel: "User", + requiredPerms: ["EMBED_LINKS"] +}; + +exports.help = { + name: "wag", + category: "Image", + description: "Wag the tail :3", + usage: "wag" +};