discord.js
Advanced tools
Comparing version 3.6.0 to 3.6.1
{ | ||
"name": "discord.js", | ||
"version": "3.6.0", | ||
"version": "3.6.1", | ||
"description": "A way to interface with the Discord API", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
@@ -7,3 +7,4 @@ <p align="center"> | ||
[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) | ||
[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest) | ||
@@ -14,5 +15,2 @@ discord.js is a node module used as a way of interfacing with | ||
**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 | ||
@@ -51,3 +49,3 @@ `npm install --save discord.js` | ||
#### 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) | ||
@@ -65,38 +63,4 @@ #### PHP | ||
### 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 | ||
**[Documentation](https://github.com/discord-js/discord.js/wiki/Documentation)** | ||
**[Documentation](http://discordjs.readthedocs.org/en/latest/)** | ||
@@ -115,3 +79,6 @@ **[GitHub](https://github.com/discord-js/discord.js)** | ||
If you would like to contact me, you can create an issue on the GitHub repo | ||
or send a DM to **hydrabolt** in [Discord API](https://discord.gg/0SBTUU1wZTYd2XyW). | ||
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! | ||
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). |
@@ -16,2 +16,7 @@ class PMChannel { | ||
getMessage(key, value){ | ||
if(this.messages.length > 1000){ | ||
this.messages.splice(0,1); | ||
} | ||
for(var message of this.messages){ | ||
@@ -18,0 +23,0 @@ if(message[key] === value){ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
735494
62
17175
80