screenshot

This commit is contained in:
derpystuff 2024-01-18 21:34:06 +01:00
parent 3c180acdf1
commit 809409920e
3 changed files with 16 additions and 17 deletions

View file

@ -16,7 +16,9 @@ const ObeliskApi = Object.freeze({
SUMMARIZE_WEBPAGES: "/flamingo/v1/web:summarize",
AI_WALLPAPER: "/robin/v1/wallpaper:generate"
AI_WALLPAPER: "/robin/v1/wallpaper:generate",
WEBSHOT: "/peacock/v1/screenshot",
})
module.exports = {

View file

@ -94,4 +94,12 @@ module.exports.aiWallpaper = async function(context, prompt, style){
prompt,
style
})
}
// PEACOCK
module.exports.webshot = async function(context, url, allowAdultContent = false){
return await request(ObeliskApi.WEBSHOT, "POST", {}, {
url,
allow_adult: allowAdultContent
})
}