mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-06 14:20:51 +02:00
Update neopet-image-finder
This commit is contained in:
@@ -40,9 +40,9 @@ module.exports = class NeopetCommand extends Command {
|
||||
|
||||
async run(msg, { pet, mood }) {
|
||||
try {
|
||||
const link = await petImage(pet, { mood: moods[mood] });
|
||||
if (!link) return msg.say('Could not find any results.');
|
||||
return msg.say(link);
|
||||
const data = await petImage(pet, { mood: moods[mood] });
|
||||
if (!data) return msg.say('Could not find any results.');
|
||||
return msg.say({ files: [{ attachment: data.data, name: `${pet}.png` }] });
|
||||
} catch (err) {
|
||||
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
|
||||
}
|
||||
|
||||
+2
-2
@@ -42,14 +42,14 @@
|
||||
"dotenv": "^6.0.0",
|
||||
"erlpack": "github:discordapp/erlpack",
|
||||
"mathjs": "^5.1.1",
|
||||
"neopet-image-finder": "^4.0.1",
|
||||
"neopet-image-finder": "^5.0.0",
|
||||
"node-opus": "^0.3.0",
|
||||
"node-superfetch": "^0.1.4",
|
||||
"random-js": "^1.0.8",
|
||||
"zlib-sync": "^0.1.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^5.4.0",
|
||||
"eslint": "^5.5.0",
|
||||
"eslint-config-amber": "^1.1.0",
|
||||
"eslint-plugin-json": "^1.2.1"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user