Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/theradioguy/discord-user-api
Library to use Discord client api
https://github.com/theradioguy/discord-user-api
Last synced: 29 days ago
JSON representation
Library to use Discord client api
- Host: GitHub
- URL: https://github.com/theradioguy/discord-user-api
- Owner: TheRadioGuy
- License: gpl-3.0
- Created: 2021-08-19T07:46:31.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-08-19T14:42:54.000Z (over 3 years ago)
- Last Synced: 2024-11-07T00:36:41.723Z (3 months ago)
- Language: JavaScript
- Size: 22.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Discord User API
discord-user-api works by requiring the package in your NodeJS file then calling its functions.## Installation
To install the package type the following:
```bash
npm install discord-user-api
```## Getting Started
Require the discord-user-api module and create an instance of the API like the following example:```JS
var client = new (require('discord-user-api'))('discord token');
```## API Methods
**Join Server:**
```JS
client.joinServer('invite code');
```**Leave Server:**
```JS
client.leaveServer('server id');
```**Get Servers:**
```JS
client.getServers(function(data) {
console.log(data);
});
```**Send Message:**
```JS
client.sendMessage('channel id', 'message');
```**Delete Message:**
```JS
client.deleteMessage('channel id', 'message id');
```**Get Messages:**
```JS
client.getMessages('channel id', 25);
```**Add Reaction:**
```JS
client.addReaction('channel id', 'message id', '🐢');
```**Remove Reaction:**
```JS
client.removeReaction('channel id', 'message id', '🐢');
```**Is Typing:**
```JS
client.isTyping('channel id');
```**Change Nickname:**
```JS
client.changeNickname('server id', 'new nickname');
```**Update Status:**
```JS
client.updateStatus('dnd');
```**Update User Settings:**
```JS
client.updateUserSettings('username', 'email', 'password', 'new password', 'data:image/jpeg;base64,Hq..');
```**Create Server:**
```JS
client.createServer('server name', 'eu-west', 'data:image/jpeg;base64,H8q..');
```**Delete Server:**
```JS
client.deleteServer('server id');
```**Create Channel:**
```JS
client.createChannel('server id', 'channel name', 'channel parent id', 'channel type');
```**Delete Channel:**
```JS
client.deleteChannel('channel id');
```**Create Role:**
```JS
client.createRole('server id');
```**Delete Role:**
```JS
client.deleteRole('server id', 'role id');
```**Join Hypesquad:**
```JS
client.joinHypesquad(1);
```**Create Invite:**
```JS
client.createInvite('channel id');
```**Get Relationships**
```JS
client.getRelationships();
```