dsn.js

1.0.2 • Public • Published

dsn.js

Table of Content

Info

DSN.JS is the javascript library wrapper for discordservices.net. It has 100% coverage for it's api. This library will be updated whenever the api for discordservices.net is updated.

Installation

npm i dsn.js

Documentation

Constructor

const DSN = require("dsn.js")
const dsn = new DSN.Client(dsn-api-token-string)

Where dsn-api-token-string is your api token

serverCount

 
const DSN = require("dsn.js")
const dsn = new DSN.Client(dsn-api-token-string)
 
dsn.serverCount(botid, { guildcount: your-guild-count, shardcount: your-shard-count }, function(data){
    console.log(data)
})

Where your-guild-count is your bot's server count, your-shard-count is your bot's shard count, and dsn-api-token-string is your api token, botid is your bot's id

postNews

 
const DSN = require("dsn.js")
const dsn = new DSN.Client(dsn-api-token-string)
 
dsn.postNews(botid, { "title": title, "content": content, "error": error }, function(data){
    console.log(data)
})

Where botid is your bot's id, title is the title of the new, content is your new's content, and error is a boolean on error.

postCommands

 
const DSN = require("dsn.js")
const dsn = new DSN.Client(dsn-api-token-string)
 
let commands = [ {
 
    "command": command,
    
    "desc": description,
 
    "category": category
    
    },{
 
    "command": command,
    
    "desc": description,
 
    "category": category
    
    } ]
 
dsn.postCommands(botid, commands, function(callback){
    console.log(callback)
})

commands here is an object of all of the commands, botid is your bot's id, command is your command name, description is the description of the command, and category is the category of the command.

Changelog

5/30/2020 - v1.0.2 - bug fixes

  1. fixed multiple typo in README and package description

Package Sidebar

Install

npm i dsn.js

Weekly Downloads

10

Version

1.0.2

License

Apache-2.0

Unpacked Size

6.25 kB

Total Files

4

Last publish

Collaborators

  • hydrogen-studio-llc