mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-19 21:40:51 +02:00
Fix
This commit is contained in:
@@ -8,7 +8,7 @@ module.exports = class SipCommand extends Command {
|
|||||||
super(client, {
|
super(client, {
|
||||||
name: 'sip',
|
name: 'sip',
|
||||||
aliases: ['tea', 'sip-tea'],
|
aliases: ['tea', 'sip-tea'],
|
||||||
group: 'edit-avatar',
|
group: 'edit-image',
|
||||||
memberName: 'sip',
|
memberName: 'sip',
|
||||||
description: 'Draws a user\'s avatar sipping tea.',
|
description: 'Draws a user\'s avatar sipping tea.',
|
||||||
throttling: {
|
throttling: {
|
||||||
@@ -46,7 +46,7 @@ module.exports = class SipCommand extends Command {
|
|||||||
async run(msg, { image, direction }) {
|
async run(msg, { image, direction }) {
|
||||||
try {
|
try {
|
||||||
const overlay = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', 'sip.png'));
|
const overlay = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', 'sip.png'));
|
||||||
const { body } = await request.get(avatarURL);
|
const { body } = await request.get(image);
|
||||||
const base = await loadImage(body);
|
const base = await loadImage(body);
|
||||||
const canvas = createCanvas(base.width, base.height);
|
const canvas = createCanvas(base.width, base.height);
|
||||||
const scaleH = overlay.width / base.width;
|
const scaleH = overlay.width / base.width;
|
||||||
|
|||||||
Reference in New Issue
Block a user