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