Style changes

This commit is contained in:
Daniel Odendahl Jr
2017-10-09 12:52:59 +00:00
parent bf19c9e398
commit c25facec0e
18 changed files with 22 additions and 42 deletions
+1 -2
View File
@@ -15,8 +15,7 @@ module.exports = class CatCommand extends Command {
async run(msg) {
try {
const { body } = await snekfetch
.get('http://random.cat/meow');
const { body } = await snekfetch.get('http://random.cat/meow');
return msg.say({ files: [body.file] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
+1 -2
View File
@@ -15,8 +15,7 @@ module.exports = class DogCommand extends Command {
async run(msg) {
try {
const { body } = await snekfetch
.get('https://dog.ceo/api/breeds/image/random');
const { body } = await snekfetch.get('https://dog.ceo/api/breeds/image/random');
return msg.say({ files: [body.message] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
+1 -2
View File
@@ -24,8 +24,7 @@ module.exports = class HistoryCommand extends Command {
async run(msg, { date }) {
try {
const { text } = await snekfetch
.get(`http://history.muffinlabs.com/date${date ? `/${date}` : ''}`);
const { text } = await snekfetch.get(`http://history.muffinlabs.com/date${date ? `/${date}` : ''}`);
const body = JSON.parse(text);
const events = body.data.Events;
const event = events[Math.floor(Math.random() * events.length)];
+1 -2
View File
@@ -20,8 +20,7 @@ module.exports = class NumberFactCommand extends Command {
async run(msg, { number }) {
try {
const { text } = await snekfetch
.get(`http://numbersapi.com/${number}`);
const { text } = await snekfetch.get(`http://numbersapi.com/${number}`);
return msg.say(text);
} catch (err) {
if (err.status === 404) return msg.say('Could not find any results.');
+1 -2
View File
@@ -13,8 +13,7 @@ module.exports = class QuoteCommand extends Command {
async run(msg) {
try {
const { body } = await snekfetch
.get('https://talaikis.com/api/quotes/random/');
const { body } = await snekfetch.get('https://talaikis.com/api/quotes/random/');
return msg.say(`${body.quote} - _${body.author}_`);
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);