2.5.2 • Published 4 years ago

discordservices.jstest v2.5.2

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

Methods

Logging In

ParamTypeDefaultDescription
optionsObjectOptions for client
options.idstring""Discord bot id
options.tokenstring""DiscordServices token
import { Client } from "discordservices.js"; // ES6
// or
const { Client } = require("discordservices.js"); // ES5

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

Updating Stats

ParamTypeDescription
statsObjectStats for update
stats.serversnumberThe number of servers the bot
stats.shardsnumberThe number of shards the bot

Posting News

ParamTypeDefaultDescription
newsObjectNews for post
news.titlestring""News title
news.contentstring""News content
news.errorbooleanfalseIs error news
ds.postNews({
    title,
    content
}); // => Promise

Updating Commands †

ParamTypeDescription
commandsObject[]Commands for update
commands.commandstringCommand name
commands.descstringCommand description
commands.categorystringCommand category

Events

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

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

4 years ago

2.5.1

4 years ago