mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-19 04:53:30 +01:00
Updated docs
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
Cache
|
||||
=====
|
||||
|
||||
**extends Array**
|
||||
|
||||
A Cache object extends an Array (so it can be used like a regular array) but introduces helper functions to make it more useful when developing with discord.js. Unlike a regular array, it doesn't care about the instance or prototype of an object, it works purely on properties.
|
||||
|
||||
Functions
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
Client
|
||||
======
|
||||
|
||||
**extends EventEmitter_**
|
||||
|
||||
This page contains documentation on the `Discord.Client` class. This should be used when you want to start creating things with the API.
|
||||
|
||||
Attributes
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
.. _Client : ./docs_client.html
|
||||
.. _Cache : ./docs_cache.html
|
||||
.. _Promises : https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise
|
||||
.. _EventEmitter : https://nodejs.org/api/events.html#events_class_events_eventemitter
|
||||
@@ -1389,7 +1389,7 @@ var InternalClient = (function () {
|
||||
|
||||
if (channel instanceof PMChannel) {
|
||||
//PM CHANNEL
|
||||
client.emit("channelUpdated", self.private_channels.update(channel, new PMChannel(data, client)));
|
||||
client.emit("channelUpdated", channel, self.private_channels.update(channel, new PMChannel(data, client)));
|
||||
} else {
|
||||
if (channel.server) {
|
||||
if (channel.type === "text") {
|
||||
|
||||
@@ -30,7 +30,7 @@ var Cache = (function (_Array) {
|
||||
};
|
||||
|
||||
Cache.prototype.getAll = function getAll(key, value) {
|
||||
var found = [];
|
||||
var found = new Cache(this.discrim);
|
||||
this.forEach(function (val, index, array) {
|
||||
if (val.hasOwnProperty(key) && val[key] == value) {
|
||||
found.push(val);
|
||||
|
||||
Reference in New Issue
Block a user