From 23fbc29a355b9dc818cda3b1f795300f858259bb Mon Sep 17 00:00:00 2001 From: TheSkele27 <33150773+TheSkele27@users.noreply.github.com> Date: Sun, 16 Sep 2018 19:33:17 +0300 Subject: [PATCH 1/2] New doggo command --- commands/doggo.js | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 commands/doggo.js diff --git a/commands/doggo.js b/commands/doggo.js new file mode 100644 index 0000000..4e324b1 --- /dev/null +++ b/commands/doggo.js @@ -0,0 +1,28 @@ +const Discord = require("discord.js"); +const superagent = require ("superagent"); + +module.exports.run = async (client, message, arges) => { + + let {body} = await superagent + .get ('https://random.dog/woof.json'); + + let dogembed = new Discord.RichEmbed() + .setColor("#f48c42") + .setTitle(":dog: Woof!") + .setImage(body.url); + + message.channel.send(dogembed); +} + exports.conf = { + enabled: true, + guildOnly: false, + aliases: [], + permLevel: "Standard User" + }; + + exports.help = { + name: "doggo", + category: "Fun", + description: "Provides a random picture of a dog.", + usage: "doggo" + }; From 11ae2179b766cff76f85a6729e087eed798e049b Mon Sep 17 00:00:00 2001 From: TheSkele27 <33150773+TheSkele27@users.noreply.github.com> Date: Sun, 16 Sep 2018 19:38:13 +0300 Subject: [PATCH 2/2] Update doggo.js --- commands/doggo.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/commands/doggo.js b/commands/doggo.js index 4e324b1..2f6eed9 100644 --- a/commands/doggo.js +++ b/commands/doggo.js @@ -1,18 +1,18 @@ const Discord = require("discord.js"); const superagent = require ("superagent"); -module.exports.run = async (client, message, arges) => { +module.exports.run = async (client, message) => { - let {body} = await superagent + const {body} = await superagent .get ('https://random.dog/woof.json'); - let dogembed = new Discord.RichEmbed() + const dogembed = new Discord.RichEmbed() .setColor("#f48c42") .setTitle(":dog: Woof!") .setImage(body.url); message.channel.send(dogembed); -} +}; exports.conf = { enabled: true, guildOnly: false,