mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 11:03:30 +01:00
Documented new additions
This commit is contained in:
@@ -295,10 +295,24 @@ setStatus(status, `game`, `callback`)
|
|||||||
|
|
||||||
Sets the Discord Status of the Client
|
Sets the Discord Status of the Client
|
||||||
|
|
||||||
- **status** - `String`, either `online` or `idle`
|
- **status** - `String`, either ``online, here, active, available`` or ``idle, away``
|
||||||
- **game** - `String/Number`, ID of Discord Game being played
|
- **game** - `String/Number`, ID of Discord Game being played
|
||||||
- **callback** - `function` taking the following:
|
- **callback** - `function` taking the following:
|
||||||
- **error** - error if any occurred
|
- **error** - error if any occurred
|
||||||
|
|
||||||
|
setStatusIdle()
|
||||||
|
~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
**Alias:** `setStatusAway`
|
||||||
|
|
||||||
|
Sets the status of the Client to Idle/Away
|
||||||
|
|
||||||
|
setStatusOnline()
|
||||||
|
~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
**Aliases:** `setStatusHere`, `setStatusActive`, `setStatusAvailable`
|
||||||
|
|
||||||
|
Sets the status of the Client to Online
|
||||||
|
|
||||||
setTopic(channel, topic, `callback`)
|
setTopic(channel, topic, `callback`)
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|||||||
@@ -60,6 +60,8 @@ Timestamp on when the message was last edited, `Number`. Potentially null.
|
|||||||
author
|
author
|
||||||
~~~~~~
|
~~~~~~
|
||||||
|
|
||||||
|
**Alias:** `sender`
|
||||||
|
|
||||||
The User_ that sent the message.
|
The User_ that sent the message.
|
||||||
|
|
||||||
content
|
content
|
||||||
|
|||||||
@@ -822,6 +822,10 @@ var Client = (function (_EventEmitter) {
|
|||||||
this.setStatusOnline();
|
this.setStatusOnline();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Client.prototype.setStatusAvailable = function setStatusAvailable() {
|
||||||
|
this.setStatusOnline();
|
||||||
|
};
|
||||||
|
|
||||||
Client.prototype.setStatusAway = function setStatusAway() {
|
Client.prototype.setStatusAway = function setStatusAway() {
|
||||||
this.setStatusIdle();
|
this.setStatusIdle();
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -813,6 +813,10 @@ class Client extends EventEmitter {
|
|||||||
this.setStatusOnline();
|
this.setStatusOnline();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setStatusAvailable() {
|
||||||
|
this.setStatusOnline();
|
||||||
|
}
|
||||||
|
|
||||||
setStatusAway() {
|
setStatusAway() {
|
||||||
this.setStatusIdle();
|
this.setStatusIdle();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user