Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ksoft.js

Package Overview
Dependencies
Maintainers
2
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ksoft.js

Official Node.js Wrapper for the KSoft.Si API.

  • 2.1.1
  • npm
  • Socket score

Version published
Weekly downloads
10
decreased by-41.18%
Maintainers
2
Weekly downloads
 
Created
Source

ksoft.js

Documentation WIP.

This is the official Node.js Wrapper for the KSoft.Si API.

Usage

All API calls are async. You have to put them into an async function, and await them. Else, they will return a Promise.

Example:

const { KSoftClient } = require('ksoft.js');

const ksoft = new KSoftClient('your-very-nice-token');

async function test () {
	const aww = await ksoft.images.aww();
	message.send(aww.url);
}

test();

Ban Builder

For ksoft.bans.add, I have included a ban builder, which makes it considerably easier to send a ban request to KSoft.

API:

ban.setUser(id: Snowflake, name: String, discriminator: String);
ban.setReason(reason: String, proof: URL);
ban.setModerator(id: Snowflake);

Example:

const { Ban, KSoftClient } = require('ksoft.js');

const ksoft = new KSoftClient('your-very-nice-token');
const ban = new Ban()
	.setUser('123456789123456789', 'Wumpus', '0001')
	.setReason('Bad Raider', 'https://i.imgur.com/ban_em_already')
	.setModerator('102102717165506560');

ksoft.bans.add(ban);

APIs

Bans

Add Ban
ksoft.bans.add(ban: Ban);

Response:

Promise<{ success: true } | {success: false, message: '[error that occured]'}>

Get Ban Info
ksoft.bans.info(id: Snowflake);

Response:

Promise<Ban>

Keywords

FAQs

Package last updated on 08 Oct 2019

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc