1.0.4 • Published 5 years ago

discord-client-api v1.0.4

Weekly downloads
3
License
ISC
Repository
github
Last release
5 years ago

Discord Client API

discord-client-api works by requiring the package in your NodeJS file then calling its functions.

Installation

To install the package type the following:

npm install discord-client-api

Getting Started

Require the discord-client-api module and create an instance of the API like the following example:

var client = new (require('discord-client-api'))('discord token');

API Methods

Join Server:

client.joinServer('invite code', function(data) {
   console.log(data);
});

Leave Server:

client.leaveServer('server id', function(data) {
   console.log(data);
});

Get Servers:

client.getServers(function(data) {
   console.log(data);
});

Send Message:

client.sendMessage('channel id', 'message', function(data) {
   console.log(data);
});

Delete Message:

client.deleteMessage('channel id', 'message id', function(data) {
   console.log(data);
});

Get Messages:

client.getMessages('channel id', 25, function(data) {
   console.log(data);
});

Add Reaction:

client.addReaction('channel id', 'message id', '🐢', function(data) {
   console.log(data);
});

Remove Reaction:

client.removeReaction('channel id', 'message id', '🐢', function(data) {
   console.log(data);
});

Is Typing:

client.isTyping('channel id', function(data) {
   console.log(data);
});

Change Nickname:

client.changeNickname('server id', 'new nickname', function(data) {
   console.log(data);
});

Update Status:

client.updateStatus('dnd', function(data) {
   console.log(data);
});

Update User Settings:

client.updateUserSettings('username', 'email', 'password', 'new password', 'data:image/jpeg;base64,Hq..', function(data) {
   console.log(data);
});

Create Server:

client.createServer('server name', 'eu-west', 'data:image/jpeg;base64,H8q..', function(data) {
   console.log(data);
});

Delete Server:

client.deleteServer('server id', function(data) {
   console.log(data);
});

Create Channel:

client.createChannel('server id', 'channel name', 'channel parent id', 'channel type', function(data) {
   console.log(data);
});

Delete Channel:

client.deleteChannel('channel id', function(data) {
   console.log(data);
});

Create Role:

client.createRole('server id', function(data) {
   console.log(data);
});

Delete Role:

client.deleteRole('server id', 'role id', function(data) {
   console.log(data);
});

Join Hypesquad:

client.joinHypesquad(1, function(data) {
   console.log(data);
});
1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago