mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 18:43:31 +01:00
Updated readme @ 3.6.1
This commit is contained in:
51
README.md
51
README.md
@@ -4,15 +4,13 @@
|
|||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
[](https://travis-ci.org/hydrabolt/discord.js)
|
[](https://travis-ci.org/hydrabolt/discord.js) [](http://discordjs.readthedocs.org/en/latest/?badge=latest)
|
||||||
|
|
||||||
|
|
||||||
discord.js is a node module used as a way of interfacing with
|
discord.js is a node module used as a way of interfacing with
|
||||||
[Discord](https://discordapp.com/). It is a very useful module for creating
|
[Discord](https://discordapp.com/). It is a very useful module for creating
|
||||||
bots.
|
bots.
|
||||||
|
|
||||||
**Updating to 3.1.1 is essential as it has new changes to be compatible with Discord's API,
|
|
||||||
and to make sure your application still works an update is a good idea.**
|
|
||||||
|
|
||||||
### Installation
|
### Installation
|
||||||
`npm install --save discord.js`
|
`npm install --save discord.js`
|
||||||
|
|
||||||
@@ -46,7 +44,7 @@ Here is a list of other Discord APIs:
|
|||||||
|
|
||||||
[DiscordSharp](https://github.com/Luigifan/DiscordSharp)
|
[DiscordSharp](https://github.com/Luigifan/DiscordSharp)
|
||||||
#### NodeJS
|
#### NodeJS
|
||||||
[node-discord](https://github.com/izy521/node-discord) (similar to discord.js but lower level)
|
[discord.io](https://github.com/izy521/node-discord) (similar to discord.js but lower level)
|
||||||
|
|
||||||
#### PHP
|
#### PHP
|
||||||
[DiscordPHP](https://github.com/teamreflex/DiscordPHP)
|
[DiscordPHP](https://github.com/teamreflex/DiscordPHP)
|
||||||
@@ -59,42 +57,8 @@ Here is a list of other Discord APIs:
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
### Changes in 3.1.4
|
|
||||||
|
|
||||||
No, not π. But instead, pseduo-synchronous messaging was added! This means that
|
|
||||||
you can tell your Client to make a queue of "actions" per channel, and it will
|
|
||||||
work through them one by one. This is a really useful tool if you need to send
|
|
||||||
messages in a specific order without callback hell.
|
|
||||||
|
|
||||||
It also allows you to store responses - such as created messages - in the returned
|
|
||||||
promise - named action. Example:
|
|
||||||
|
|
||||||
```js
|
|
||||||
var mybot = new Discord.Client({
|
|
||||||
queue : true //enable queueing, disabled by default
|
|
||||||
});
|
|
||||||
|
|
||||||
mybot.on("message", function(msg){
|
|
||||||
|
|
||||||
mybot.sendMessage(msg.channel, "this is message 1");
|
|
||||||
var action = mybot.sendMessage(msg.channel, "this is message 2");
|
|
||||||
mybot.sendMessage(msg.channel, "this is message 3").then(rmv);
|
|
||||||
|
|
||||||
function rmv(){
|
|
||||||
if(!action.error){
|
|
||||||
mybot.deleteMessage(action.message);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
```
|
|
||||||
|
|
||||||
This is still in development, and will see many more enhancements in future.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### Links
|
### Links
|
||||||
**[Documentation](https://github.com/discord-js/discord.js/wiki/Documentation)**
|
**[Documentation](http://discordjs.readthedocs.org/en/latest/)**
|
||||||
|
|
||||||
**[GitHub](https://github.com/discord-js/discord.js)**
|
**[GitHub](https://github.com/discord-js/discord.js)**
|
||||||
|
|
||||||
@@ -108,5 +72,8 @@ This is still in development, and will see many more enhancements in future.
|
|||||||
|
|
||||||
### Contact
|
### Contact
|
||||||
|
|
||||||
If you would like to contact me, you can create an issue on the GitHub repo
|
If you have an issue or want to know if a feature exists, [read the documentation](http://discordjs.readthedocs.org/en/latest/) before contacting me about any issues! If it's badly/wrongly implemented, let me know!
|
||||||
or send a DM to **hydrabolt** in [Discord API](https://discord.gg/0SBTUU1wZTYd2XyW).
|
|
||||||
|
|
||||||
|
If you would like to contact me, you can create an issue on the GitHub repo, e-mail me via the one available on my NPM profile.
|
||||||
|
Or you could just send a DM to **hydrabolt** in [**Discord API**](https://discord.gg/0SBTUU1wZTYd2XyW).
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "discord.js",
|
"name": "discord.js",
|
||||||
"version": "3.6.0",
|
"version": "3.6.1",
|
||||||
"description": "A way to interface with the Discord API",
|
"description": "A way to interface with the Discord API",
|
||||||
"main": "./lib/index.js",
|
"main": "./lib/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user