mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-25 06:42:51 +02:00
Remove all useless async
This commit is contained in:
@@ -18,12 +18,17 @@ module.exports = class NeopetCommand extends commando.Command {
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let petID = encodeURI(message.content.toLowerCase().split(" ").slice(1).join(" "));
|
||||
if (petID === "getid") {
|
||||
let petIDMsg = await message.channel.send("To get your pet's ID, simply go to http://www.sunnyneo.com/petimagefinder.php and enter your pet's name. It's image should show up. Then, find the link below the pet's image, and copy it to your message!");
|
||||
let petIDMsg2 = await message.channel.sendFile('./images/PetID.png');
|
||||
let petIDMsg3 = await message.channel.send("It's recommended you keep this ID with you so you can easily share your pet's picture without having to repeat these steps.");
|
||||
let petIDMsg = await message.channel.send("To get your pet's ID, simply go to http://www.sunnyneo.com/petimagefinder.php and enter your pet's name. It's image should show up. Then, find the link below the pet's image, and copy it to your message! It's recommended you keep this ID with you so you can easily share your pet's picture without having to repeat these steps.");
|
||||
return message.channel.sendFile('./images/PetID.png');
|
||||
}
|
||||
else {
|
||||
message.channel.send(`Result for: ${petID}`).then(message.channel.sendFile(`http://pets.neopets.com/cp/${petID}/1/5.png`).catch(error => message.channel.send(":x: Error! Pet ID Not Found! Use `;neopet getID` for help on getting your pet ID.")));
|
||||
try {
|
||||
let petMsg = await message.channel.send(`Result for: ${petID}`);
|
||||
return message.channel.sendFile(`http://pets.neopets.com/cp/${petID}/1/5.png`);
|
||||
}
|
||||
catch (err) {
|
||||
return message.channel.send(":x: Error! Pet ID Not Found! Use `;neopet getID` for help on getting your pet ID.");
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user