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,10 +1,10 @@
const snekfetch = require('snekfetch');
const request = require('superagent');
const { DISCORD_BOTS_TOKEN } = process.env;
class BotListUtil {
static async discordBots(client) {
try {
const { body } = await snekfetch
const { body } = await request
.post(`https://bots.discord.pw/api/bots/${client.user.id}/stats`)
.set({ Authorization: DISCORD_BOTS_TOKEN })
.send({ server_count: client.guilds.size });
+2 -2
View File
@@ -1,4 +1,4 @@
const snekfetch = require('snekfetch');
const request = require('superagent');
const crypto = require('crypto');
const { IMGUR_KEY } = process.env;
const yes = ['yes', 'y', 'ye', 'yeah', 'yup', 'yea'];
@@ -60,7 +60,7 @@ class Util {
}
static async randomFromImgurAlbum(album) {
const { body } = await snekfetch
const { body } = await request
.get(`https://api.imgur.com/3/album/${album}`)
.set({ Authorization: `Client-ID ${IMGUR_KEY}` });
if (!body.data.images.length) return null;