mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-17 16:19:12 +02:00
Switch to YET ANOTHER UNTESTED HTTP LIB! (But it's okay I made this one)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const request = require('superagent');
|
||||
const request = require('node-superfetch');
|
||||
const { shorten } = require('../../util/Util');
|
||||
const { GOV_KEY } = process.env;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const request = require('superagent');
|
||||
const request = require('node-superfetch');
|
||||
const { stripIndents } = require('common-tags');
|
||||
|
||||
module.exports = class DoomsdayClockCommand extends Command {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const request = require('superagent');
|
||||
const request = require('node-superfetch');
|
||||
|
||||
module.exports = class GoogleDoodleCommand extends Command {
|
||||
constructor(client) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const request = require('superagent');
|
||||
const request = require('node-superfetch');
|
||||
const { today, tomorrow } = require('../../util/Util');
|
||||
const { GOOGLE_KEY, GOOGLE_CALENDAR_ID } = process.env;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
const request = require('superagent');
|
||||
const request = require('node-superfetch');
|
||||
const { list } = require('../../util/Util');
|
||||
const signs = require('../../assets/json/horoscope');
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const request = require('superagent');
|
||||
const request = require('node-superfetch');
|
||||
const { stripIndents } = require('common-tags');
|
||||
const { list, duration, tomorrow } = require('../../util/Util');
|
||||
const { GOLD_FISH_EMOJI_ID, SILVER_FISH_EMOJI_ID } = process.env;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
const request = require('superagent');
|
||||
const request = require('node-superfetch');
|
||||
|
||||
module.exports = class TodayInHistoryCommand extends Command {
|
||||
constructor(client) {
|
||||
@@ -33,9 +33,7 @@ module.exports = class TodayInHistoryCommand extends Command {
|
||||
async run(msg, { month, day }) {
|
||||
const date = month && day ? `/${month}/${day}` : '';
|
||||
try {
|
||||
const { text } = await request
|
||||
.get(`http://history.muffinlabs.com/date${date}`)
|
||||
.buffer();
|
||||
const { text } = await request.get(`http://history.muffinlabs.com/date${date}`);
|
||||
const body = JSON.parse(text);
|
||||
const events = body.data.Events;
|
||||
const event = events[Math.floor(Math.random() * events.length)];
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const request = require('superagent');
|
||||
const request = require('node-superfetch');
|
||||
const { stripIndents } = require('common-tags');
|
||||
const { WORDNIK_KEY } = process.env;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user