mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +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
|
||||
|
||||
- **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
|
||||
- **callback** - `function` taking the following:
|
||||
- **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`)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@@ -60,6 +60,8 @@ Timestamp on when the message was last edited, `Number`. Potentially null.
|
||||
author
|
||||
~~~~~~
|
||||
|
||||
**Alias:** `sender`
|
||||
|
||||
The User_ that sent the message.
|
||||
|
||||
content
|
||||
|
||||
@@ -822,6 +822,10 @@ var Client = (function (_EventEmitter) {
|
||||
this.setStatusOnline();
|
||||
};
|
||||
|
||||
Client.prototype.setStatusAvailable = function setStatusAvailable() {
|
||||
this.setStatusOnline();
|
||||
};
|
||||
|
||||
Client.prototype.setStatusAway = function setStatusAway() {
|
||||
this.setStatusIdle();
|
||||
};
|
||||
|
||||
@@ -813,6 +813,10 @@ class Client extends EventEmitter {
|
||||
this.setStatusOnline();
|
||||
}
|
||||
|
||||
setStatusAvailable() {
|
||||
this.setStatusOnline();
|
||||
}
|
||||
|
||||
setStatusAway() {
|
||||
this.setStatusIdle();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user