The Node.JS wrapper for interfacing with APY.
const { Image } = require('apy-wrapper');
(async () => {
let image = await Image.get('discordjs', { text: 'APY' });
console.log(image);
});
const { AttachmentBuilder } = require('discord.js'),
{ Image } = require('apy-wrapper');
...
async run(message, args) {
let image = await Image.get('discordjs', { text: 'APY' });
let attach = new AttachmentBuilder(image, { name: 'myAPYImage.jpeg' });
return (await message.channel.send({ content: 'Hello!', files: [attach] }));
}