mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 15:07:42 +02:00
Add portrait flag to neopet
This commit is contained in:
@@ -22,6 +22,16 @@ module.exports = class NeopetCommand extends Command {
|
||||
reason: 'Pet Image Data, Original Game'
|
||||
}
|
||||
],
|
||||
flags: [
|
||||
{
|
||||
key: 'portrait',
|
||||
description: 'Gets a small portrait of the pet.'
|
||||
},
|
||||
{
|
||||
key: 'p',
|
||||
description: 'Alias for portrait.'
|
||||
}
|
||||
],
|
||||
args: [
|
||||
{
|
||||
key: 'pet',
|
||||
@@ -41,8 +51,8 @@ module.exports = class NeopetCommand extends Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(msg, { pet, mood }) {
|
||||
const petImg = await petImage(pet, { mood, size: 5 });
|
||||
async run(msg, { pet, mood, flags }) {
|
||||
const petImg = await petImage(pet, { mood, size: flags.portrait ? 6 : 5 });
|
||||
if (!petImg) return msg.say('Could not find any results.');
|
||||
return msg.say({ files: [{ attachment: petImg.data, name: `${pet}-${mood}.png` }] });
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiao",
|
||||
"version": "159.0.1",
|
||||
"version": "159.1.0",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Xiao.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user