Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/izy521/discord.io
A small, single-file library for creating DiscordApp clients from Node.js or the browser
https://github.com/izy521/discord.io
browser discord discord-io discordapp library nodejs
Last synced: about 2 months ago
JSON representation
A small, single-file library for creating DiscordApp clients from Node.js or the browser
- Host: GitHub
- URL: https://github.com/izy521/discord.io
- Owner: izy521
- License: mit
- Archived: true
- Created: 2015-07-30T03:34:12.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2020-03-10T04:17:51.000Z (over 4 years ago)
- Last Synced: 2024-07-17T07:26:43.993Z (2 months ago)
- Topics: browser, discord, discord-io, discordapp, library, nodejs
- Language: JavaScript
- Homepage: https://discord.gg/0MvHMfHcTKVVmIGP
- Size: 2.81 MB
- Stars: 533
- Watchers: 27
- Forks: 156
- Open Issues: 56
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- discord-api-libs - discord.io - A small, single-file library for creating DiscordApp clients from Node.js or the browser (Libraries / JavaScript)
README
discord.io
A small, single-file, fully featured [Discordapp](https://discordapp.com) library for Node.js and browsers.
[![Discord](https://discordapp.com/api/guilds/66192955777486848/widget.png)](https://discord.gg/0MvHMfHcTKVVmIGP) [![NPM](https://img.shields.io/npm/v/discord.io.svg)](https://img.shields.io/npm/v/gh-badges.svg)
### Requirements
**Required**:
* **Node.js 0.10.x** or greater
* **Web Browser** if not using Node.js**Optional**:
* **Audio**
* **Node.js 0.12.x**
* **ffmpeg/avconv** (needs to be added to PATH)
### [Documentation / Gitbooks](https://izy521.gitbooks.io/discord-io/content/)### Getting Started:
#### Installing
**[Stable](https://www.npmjs.com/package/discord.io)**
`npm install discord.io`**[Latest](https://github.com/izy521/discord.io)**
`npm install izy521/discord.io`#### Example
```javascript
var Discord = require('discord.io');var bot = new Discord.Client({
token: "",
autorun: true
});bot.on('ready', function() {
console.log('Logged in as %s - %s\n', bot.username, bot.id);
});bot.on('message', function(user, userID, channelID, message, event) {
if (message === "ping") {
bot.sendMessage({
to: channelID,
message: "pong"
});
}
});
```