Skip to content

DiscordServices/discordservices.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

discordservices.js

ES6 Promise based API Wrapper for discordservices.net

Methods

Logging In

Params
Param Type Default Description
options Object Options for client
options.id string "" Discord bot id
options.token string "" DiscordServices token
Example
import { Client } from "discordservices.js"; // ES6
// or
const { Client } = require("discordservices.js"); // ES5

const ds = new Client({
    id,
    token
});

Updating Stats

Params
Param Type Description
stats Object Stats for update
stats.servers number The number of servers the bot
stats.shards number The number of shards the bot
Example
ds.updateStats({
    servers,
    shards
}); // => Promise

Posting News

Params
Param Type Default Description
news Object News for post
news.title string "" News title
news.content string "" News content
news.error boolean false Is error news
Example
ds.postNews({
    title,
    content
}); // => Promise

Updating Commands †

Params
Param Type Description
commands Object[] Commands for update
commands.command string Command name
commands.desc string Command description
commands.category string Command category
Example
ds.updateCommands(commands);  // => Promise

Events

Events
Name Description
updateStats Stats Update
postNews News Update
updateCommands Commands Update
updateCommands Commands Update
requestError Request error
Example
ds.on("error", (error) => {
  // ...
});

If you have any questions regarding use of this library, feel free to contact the developer(s).

† The structure of the commands object can be found on the API page here

About

discordservices.net js lib

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •