Zoro API is an API that generates images with filters to enhance your photos !
Installation
npm i --save zoro-api
Configuration
The first step is to import the module in your code.
constZoro=require("zoro-api");
Then you have to request your image and send it as an attachement.
Be careful, if you want to use animated filters (gifs), you will have to modify the extension of the gif type instead of png.
//Import the discord.js library
constDiscord=require("discord.js");
//Create a new discord.js client
constbot=newDiscord.Client()
//Import the module
constZoro=require("zoro-api");
//Listen to the ready event
bot.on("ready",()=>{
console.log("The robot is online !");
})
//Listen to the message event
bot.on("message",async(message)=>{
//If the user types !blur
if(message.content==="!blur"){
//Get user
let user =message.mentions.users.first()||message.author;
//Get the avatarUrl of the user
let avatar =user.displayAvatarURL({ size:512}).replace(".webp",".png")