mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-25 22:32:50 +02:00
snekfetch -> superagent
This commit is contained in:
+2
-2
@@ -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
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user