Module officiel pour l'api du bot Améthyste
Documentation officielle : https://docs.api.amethyste.moe/
npm i amethyste-api
- url = Image url
- pixelize (entre 1 et 50, default: 8)
- posterize (entre 1 et 100, defaut : 5 )
- blur (entre 1 et 30, defaut : 5)
Nom | Params |
---|---|
circle | url |
rejected | url |
approved | url |
glitch | url |
distort | url |
sepia | url |
contrast | url |
greyscale | url |
invert | url |
pixelize | url, pixelize |
blur | url, blur |
posterize | url, posterize |
beautiful | url |
afusion => avatar-fusion | url |
wanted | url |
3000years | url |
rip | url |
utatoo | url |
wasted | url |
frame | url |
moustache | url |
scary | url |
Connexion :
const ameClient = require("amethyste-api")
const ameApi = new ameClient("token")
Endpoint Generate :
ameApi.generate("endpoint", {
"url" : "image url"
}).then(image => {
console.log(image)
}).catch(err => {
throw err;
});
Returns
<Buffer ... >
Endpoint Generate Exemple:
ameApi.generate("glitch", {
"url" : "https://cdn.discordapp.com/avatars/450352584302002186/c0ff7e943ab89560503b8e99591ff888.png?size=2048"
}).then(image => {
console.log(image)
}).catch(err => {
throw err;
})
Returns
<Buffer ... >
Endpoint Image Exemple:
ameApi.image("wallpaper", {
"nsfw" : "false"
}).then(image => {
console.log(image)
}).catch(err => {
throw err;
});
Returns
{
"status": 200,
"url": "https://cdn.amethyste.moe/wallpaper/14ebdfb3f9a9e4025b54ab759f1ad9e60bd0.jpg"
}