Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/twlite/disclyssia

A personal JavaScript Discord library made for my bot
https://github.com/twlite/disclyssia

Last synced: about 1 month ago
JSON representation

A personal JavaScript Discord library made for my bot

Awesome Lists containing this project

README

        

# Disclyssia
A personal JavaScript Discord library made for my bot

# Installation
Disclyssia was made with [Node.js](https://nodejs.org/) v12.16.2, you should preferably use this version

GitHub: `npm i --save github:Sworder71/Disclyssia`

# Information
This module has currently:
- Client support (**sendMessage()** and **setPresence()** methods are made)
- No voice support
- No message support
- No channel support
- No server support
- No user support

# Example usage
```js
const Discord = require('disclyssia');
const client = new Discord.Client();

client.on('ready', async (client) => {
const self = await client.getSelf();
console.log(`${self.username}#${self.discriminator} is online !`);
await client.setPresence({ game: {name: 'Hello, World!' } });
});

client.on('message', (message) => {
if (message.content.startsWith('!ping')) {
client.sendMessage(message.channel_id, {
content: 'Pong!'
}).catch();
}
});

client.login(''); // put your bot token here
```