You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’ve recently had an idea:
Since chibisafe doesn’t have integrations like discord webhook alerts, and other things like this I’ve thought of making a node.js library with events and websocket connection so you could just listen to any events from the server like so:
const{ Client }=require("chibisafe.js");constclient=newClient({apiKey: "API KEY",url: "https://safe.classydev.fr",asAdmin: true// Could make different clients for admin or client api keys});client.on("ready",()=>{console.log("Connected to Chibisafe");});client.on("fileUploaded",file=>{console.log(file.name);console.log(file.album)// will return nothing if there is no album});client.connect();
as well you could access all the files, make searches, delete some, etc.. with a discord.js-like syntax (client.files.search(query).then(file => file.delete());)
idk maybe a library like this has already been made, but i’d like to know if there’s a way to connect to the gateway with an api key and then listen to events like so.
Could be a great idea and make communities grow as in combinaison with Discord.js you could make a Chibisafe bot to upload files, manage them, etc..
The text was updated successfully, but these errors were encountered:
I’ve recently had an idea:
Since chibisafe doesn’t have integrations like discord webhook alerts, and other things like this I’ve thought of making a node.js library with events and websocket connection so you could just listen to any events from the server like so:
as well you could access all the files, make searches, delete some, etc.. with a discord.js-like syntax (client.files.search(query).then(file => file.delete());)
idk maybe a library like this has already been made, but i’d like to know if there’s a way to connect to the gateway with an api key and then listen to events like so.
Could be a great idea and make communities grow as in combinaison with Discord.js you could make a Chibisafe bot to upload files, manage them, etc..
The text was updated successfully, but these errors were encountered: