blueapi.js
v0.0.4
Published
Simple API created by Angelo II#0007
Downloads
6
Readme
Install
$ npm i blueapi.js
Setup
const api = require('blueapi.js');
Image Example
let image = await api.image.petpet('https://miro.medium.com/max/1200/1*mk1-6aYaf_Bes1E3Imhc0A.jpeg'); //Default frames = 40
2 in 1
let image = await api.image.trigger(await api.image.circle('image')); //trigger but circle
Path Example
const api = require('blueapi.js');
const path = require('path');
let image = await api.image.blink(path.join(__dirname, 'path', 'to', 'image.png'), path.join(__dirname, 'path', 'to', 'image2.png'), path.join(__dirname, 'path', 'to', 'image3.png')); //∞ (infinity) images support
FS Example
const api = require('blueapi.js');
const fs = require('fs');
let image = await api.image.petpet('https://miro.medium.com/max/1200/1*mk1-6aYaf_Bes1E3Imhc0A.jpeg', { frames: 40 }); //Default frames = 40
fs.writeFileSync('./petpet.gif', image) //buffer
Discord.js Example
const api = require('blueapi.js');
const discord = require('discord.js'); //Discord.js V12
const client = new discord.Client();
client.on('message', async message => {
if (message.content.startsWith(`!trigger`)) {
let image = await api.image.trigger(message.author.displayAvatarURL({ dynamic: false, format: 'png' }));
let file = new discord.MessageAttachment(image, "trigger.gif");
message.channel.send(file);
}
});
Endpoints
GIF
|Value|Param| |-|-| |petpet|image, { frames }| |blink|∞ images (min = 2)| |trigger|image|
PNG
|Value|Param| |-|-| |ad|image| |circle|image|
Changelog
- + Fixed Bug
- + Added circle method
- + Fixed custom frames for petpet
- + Support infinity images for blink
- + Support files
- - Removed custom delay for blink