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