mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-26 14:19:11 +02:00
Fix has-transparency group
This commit is contained in:
@@ -8,7 +8,7 @@ module.exports = class HasTransparencyCommand extends Command {
|
|||||||
super(client, {
|
super(client, {
|
||||||
name: 'has-transparency',
|
name: 'has-transparency',
|
||||||
aliases: ['has-alpha', 'transparency', 'transparent', 'alpha'],
|
aliases: ['has-alpha', 'transparency', 'transparent', 'alpha'],
|
||||||
group: 'meme-gen',
|
group: 'analyze',
|
||||||
memberName: 'has-transparency',
|
memberName: 'has-transparency',
|
||||||
description: 'Determines if an image has transparency in it.',
|
description: 'Determines if an image has transparency in it.',
|
||||||
throttling: {
|
throttling: {
|
||||||
@@ -30,7 +30,7 @@ module.exports = class HasTransparencyCommand extends Command {
|
|||||||
try {
|
try {
|
||||||
const { body } = await request.get(image);
|
const { body } = await request.get(image);
|
||||||
const data = await loadImage(body);
|
const data = await loadImage(body);
|
||||||
return msg.say(`This image **${hasAlpha(data) ? 'has' : 'does not have'}** transparency.`);
|
return msg.reply(`This image **${hasAlpha(data) ? 'has' : 'does not have'}** transparency.`);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
|
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user