snekfetch -> superagent

This commit is contained in:
Daniel Odendahl Jr
2018-06-07 16:01:27 +00:00
parent 619c73de19
commit 8725e348be
133 changed files with 316 additions and 319 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
const Command = require('../../structures/Command');
const snekfetch = require('snekfetch');
const request = require('superagent');
module.exports = class CowSayCommand extends Command {
constructor(client) {
@@ -21,7 +21,7 @@ module.exports = class CowSayCommand extends Command {
async run(msg, { text }) {
try {
const { body } = await snekfetch
const { body } = await request
.get('http://cowsay.morecode.org/say')
.query({
message: text,
+2 -2
View File
@@ -1,5 +1,5 @@
const Command = require('../../structures/Command');
const snekfetch = require('snekfetch');
const request = require('superagent');
const { GOOGLE_KEY } = process.env;
module.exports = class ShortenURLCommand extends Command {
@@ -22,7 +22,7 @@ module.exports = class ShortenURLCommand extends Command {
async run(msg, { url }) {
try {
const { body } = await snekfetch
const { body } = await request
.post('https://www.googleapis.com/urlshortener/v1/url')
.query({ key: GOOGLE_KEY })
.send({ longUrl: url });
+2 -2
View File
@@ -1,6 +1,6 @@
const Command = require('../../structures/Command');
const { MessageEmbed } = require('discord.js');
const snekfetch = require('snekfetch');
const request = require('superagent');
const { list } = require('../../util/Util');
const codes = require('../../assets/json/translate');
const { YANDEX_KEY } = process.env;
@@ -59,7 +59,7 @@ module.exports = class TranslateCommand extends Command {
async run(msg, { text, target, base }) {
try {
const { body } = await snekfetch
const { body } = await request
.get('https://translate.yandex.net/api/v1.5/tr.json/translate')
.query({
key: YANDEX_KEY,
+2 -2
View File
@@ -1,5 +1,5 @@
const Command = require('../../structures/Command');
const snekfetch = require('snekfetch');
const request = require('superagent');
const { YODA_KEY } = process.env;
module.exports = class YodaCommand extends Command {
@@ -23,7 +23,7 @@ module.exports = class YodaCommand extends Command {
async run(msg, { sentence }) {
try {
const { body } = await snekfetch
const { body } = await request
.get('https://yoda-speak-api.herokuapp.com/')
.query({
text: sentence,