mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-19 13:56:43 +02:00
await
This commit is contained in:
@@ -28,7 +28,7 @@ module.exports = class IfunnyCommand extends Command {
|
|||||||
|
|
||||||
async run(msg, { image }) {
|
async run(msg, { image }) {
|
||||||
try {
|
try {
|
||||||
const base = loadImage(path.join(__dirname, '..', '..', 'assets', 'images', 'ifunny.png'));
|
const base = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', 'ifunny.png'));
|
||||||
const { body } = await snekfetch.get(image);
|
const { body } = await snekfetch.get(image);
|
||||||
const data = await loadImage(body);
|
const data = await loadImage(body);
|
||||||
const canvas = createCanvas(data.width, data.height);
|
const canvas = createCanvas(data.width, data.height);
|
||||||
|
|||||||
Reference in New Issue
Block a user