blueapi.js 0.0.4 • Public • Published 4 years ago
const api = require ( 'blueapi.js' ) ;
let image = await api . image . petpet ( 'https://miro.medium.com/max/1200/1*mk1-6aYaf_Bes1E3Imhc0A.jpeg' ) ; //Default frames = 40
let image = await api . image . trigger ( await api . image . circle ( 'image' ) ) ; //trigger but circle
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
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
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 ) ;
}
} ) ;
Value
Param
petpet
image, { frames }
blink
∞ images (min = 2)
trigger
image
Value
Param
ad
image
circle
image
+ Fixed Bug
+ Added circle method
+ Fixed custom frames for petpet
+ Support infinity images for blink
+ Support files
- Removed custom delay for blink
Package Sidebar Install Downloads Weekly Downloads