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,6 +1,6 @@
const Command = require('../../structures/Command');
const { createCanvas, loadImage } = require('canvas');
const snekfetch = require('snekfetch');
const request = require('superagent');
const { invert } = require('../../util/Canvas');
module.exports = class InvertCommand extends Command {
@@ -28,7 +28,7 @@ module.exports = class InvertCommand extends Command {
async run(msg, { image }) {
try {
const { body } = await snekfetch.get(image);
const { body } = await request.get(image);
const data = await loadImage(body);
const canvas = createCanvas(data.width, data.height);
const ctx = canvas.getContext('2d');