![Introducing Enhanced Alert Actions and Triage Functionality](https://cdn.sanity.io/images/cgdhsj6q/production/fe71306d515f85de6139b46745ea7180362324f0-2530x946.png?w=800&fit=max&auto=format)
Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
ksoft.js
Advanced tools
Readme
Official API Wrapper for KSoft API, written in Node.js
installing...
npm install ksoft.js --save
initializing...
const Ksoft = require('ksoft.js');
const ksoft = new Ksoft(yourtoken, webhookOptions); // webhook options will be reviewed below
ksoft.images.getRandomMeme();
ksoft.images.getRandomImage(tag);
ksoft.images.getTags();
ksoft.images.searchTags(tag);
ksoft.images.getImageFromId(snowflake);
ksoft.images.getRandomWikiHow(nsfw);
ksoft.images.getRandomCutePicture();
ksoft.images.getRandomNSFW();
ksoft.images.getRandomReddit(subReddit, removeNSFW, span);
ksoft.bans.add({
user: String,
mod: String,
user_name: String,
user_discriminator: String,
reason: String,
proof: String,
appeal_possible: Boolean,
});
ksoft.bans.getBanInfo(userID);
ksoft.bans.check(userID);
ksoft.bans.list(page, perPage);
ksoft.bans.getUpdate(epochDate);
ksoft.bans.bulkCheck(ids, {
moreInfo: Boolean,
bannedOnly: Boolean,
advancedBannedOnly: Boolean,
});
ksoft.bans.guildMembersCheck(guildMemberCollection, {
moreInfo: Boolean,
ignoreBots: Boolean,
});
ksoft.kumo.search(q, {
fast: Boolean,
more: Boolean,
mapZoom: Number,
includeMap: Boolean,
});
ksoft.kumo.getSimpleWeather(reportType, q, units, lang, icons);
ksoft.kumo.geoip(ip);
ksoft.kumo.convertCurrency(from, to, value);
ksoft.lyrics.search(q, {
textOnly: Boolean,
limit: Number,
});
ksoft.lyrics.getArtistById(id);
ksoft.lyrics.getAlbumById(id);
ksoft.lyrics.getTrackById(id);
This just requires adding a few things when we initiate ksoft.js
const Ksoft = require('ksoft.js');
const ksoft = new Ksoft('your ksoft token', {
useWebhooks: true,
port: 2000, // this is the port the http server is going to run on. This can be whatever port you want I am just using 2000 as an example
Authentication: 'your webhook authentication token',
});
ksoft.webhook.on('ready', info => {
console.log(info); // this will return the host your http server is running on. This is what you will give to ksoft to send the info to. { "host": "yourpublicip:theportyouspecified"}
});
that was just to get everything up and running now let's see how we can actually access that data. It's really simple :)
// this is an extension of the previous example. Everything works on events so you can simply do this
ksoft.webhook.on('ban', banData => {
console.log(banData); // there you simply get the banInfo sent from ksoft. All the event names are the same as on the ksoft documentation so if you want more info just go to https://docs.ksoft.si/api/webhooks
});
// the ksoft variable I am using is the initialized Ksoft class
const ban = new ksoft.CreateBan()
.setUserID('1234567892355822') // this is required
.setModID('44457845784574578')
.setUserName('blahblahblah')
.setUserDiscriminator('1234')
.setReason('testing123') // also required
.setProof('proof') // this is also required
.isAppealable(true);
ksoft.bans.add(ban).then(res => {
console.log(res); // { success: true}
});
Special thanks to sdf for helping me troubleshoot some stuff :)
FAQs
Official Node.js Wrapper for the KSoft.Si API.
The npm package ksoft.js receives a total of 10 weekly downloads. As such, ksoft.js popularity was classified as not popular.
We found that ksoft.js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.