mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 09:03:29 +01:00
Various documentation adjustments (#2001)
* docs(various): Add "at" to createdAt description * docs(Client): Adjust to fit with guilds property * docs(various): Adjust phrasing & fix typos * docs(various): Clarifications * docs(Permissions): fix numerus * docs(DataStore): capitalize DataStore * docs(various): Formatting changes * docs(Presence): Expand RichPresenceAssets docs * Add space
This commit is contained in:
@@ -99,7 +99,8 @@ class Client extends BaseClient {
|
||||
|
||||
/**
|
||||
* All of the {@link Channel}s that the client is currently handling, mapped by their IDs -
|
||||
* as long as sharding isn't being used, this will be *every* channel in *every* guild, and all DM channels
|
||||
* as long as sharding isn't being used, this will be *every* channel in *every* guild the bot
|
||||
* is a member of, and all DM channels
|
||||
* @type {ChannelStore<Snowflake, Channel>}
|
||||
*/
|
||||
this.channels = new ChannelStore(this);
|
||||
|
||||
@@ -154,7 +154,7 @@ class VoiceBroadcast extends VolumeInterface {
|
||||
}
|
||||
|
||||
/**
|
||||
* Play the given file in the voice connection.
|
||||
* Plays the given file in the voice connection.
|
||||
* @param {string} file The absolute path to the file
|
||||
* @param {StreamOptions} [options] Options for playing the stream
|
||||
* @returns {StreamDispatcher}
|
||||
@@ -236,7 +236,7 @@ class VoiceBroadcast extends VolumeInterface {
|
||||
}
|
||||
|
||||
/**
|
||||
* Play an arbitrary input that can be [handled by ffmpeg](https://ffmpeg.org/ffmpeg-protocols.html#Description)
|
||||
* Plays an arbitrary input that can be [handled by ffmpeg](https://ffmpeg.org/ffmpeg-protocols.html#Description)
|
||||
* @param {string} input The arbitrary input
|
||||
* @param {StreamOptions} [options] Options for playing the stream
|
||||
* @returns {VoiceBroadcast}
|
||||
@@ -248,7 +248,7 @@ class VoiceBroadcast extends VolumeInterface {
|
||||
}
|
||||
|
||||
/**
|
||||
* Pauses the entire broadcast - all dispatchers also pause.
|
||||
* Pauses the entire broadcast - all dispatchers are also paused.
|
||||
*/
|
||||
pause() {
|
||||
this.paused = true;
|
||||
@@ -260,7 +260,7 @@ class VoiceBroadcast extends VolumeInterface {
|
||||
}
|
||||
|
||||
/**
|
||||
* Resumes the entire broadcast - all dispatchers also resume.
|
||||
* Resumes the entire broadcast - all dispatchers are also resumed.
|
||||
*/
|
||||
resume() {
|
||||
this.paused = false;
|
||||
@@ -349,14 +349,14 @@ class VoiceBroadcast extends VolumeInterface {
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop the current stream from playing without unsubscribing dispatchers.
|
||||
* Stops the current stream from playing without unsubscribing dispatchers.
|
||||
*/
|
||||
end() {
|
||||
this.killCurrentTranscoder();
|
||||
}
|
||||
|
||||
/**
|
||||
* End the current broadcast, all subscribed dispatchers will also end.
|
||||
* Ends the current broadcast, all subscribed dispatchers will also end.
|
||||
*/
|
||||
destroy() {
|
||||
this.end();
|
||||
|
||||
@@ -304,7 +304,7 @@ class VoiceConnection extends EventEmitter {
|
||||
}
|
||||
|
||||
/**
|
||||
* Disconnect the voice connection, causing a disconnect and closing event to be emitted.
|
||||
* Disconnects the voice connection, causing a disconnect and closing event to be emitted.
|
||||
*/
|
||||
disconnect() {
|
||||
this.emit('closing');
|
||||
@@ -451,7 +451,7 @@ class VoiceConnection extends EventEmitter {
|
||||
*/
|
||||
|
||||
/**
|
||||
* Play the given file in the voice connection.
|
||||
* Plays the given file in the voice connection.
|
||||
* @param {string} file The absolute path to the file
|
||||
* @param {StreamOptions} [options] Options for playing the stream
|
||||
* @returns {StreamDispatcher}
|
||||
@@ -468,7 +468,7 @@ class VoiceConnection extends EventEmitter {
|
||||
}
|
||||
|
||||
/**
|
||||
* Play an arbitrary input that can be [handled by ffmpeg](https://ffmpeg.org/ffmpeg-protocols.html#Description)
|
||||
* Plays an arbitrary input that can be [handled by ffmpeg](https://ffmpeg.org/ffmpeg-protocols.html#Description)
|
||||
* @param {string} input the arbitrary input
|
||||
* @param {StreamOptions} [options] Options for playing the stream
|
||||
* @returns {StreamDispatcher}
|
||||
|
||||
@@ -121,8 +121,8 @@ class StreamDispatcher extends VolumeInterface {
|
||||
|
||||
|
||||
/**
|
||||
* Set the bitrate of the current Opus encoder.
|
||||
* @param {number} bitrate New bitrate, in kbps
|
||||
* Sets the bitrate of the current Opus encoder.
|
||||
* @param {number} bitrate New bitrate, in kbps.
|
||||
* If set to 'auto', the voice channel's bitrate will be used
|
||||
*/
|
||||
setBitrate(bitrate) {
|
||||
|
||||
@@ -73,7 +73,7 @@ class VoiceReceiver extends EventEmitter {
|
||||
}
|
||||
|
||||
/**
|
||||
* Destroy this VoiceReceiver, also ending any streams that it may be controlling.
|
||||
* Destroys this VoiceReceiver, also ending any streams that it may be controlling.
|
||||
*/
|
||||
destroy() {
|
||||
this.voiceConnection.sockets.udp.socket.removeListener('message', this._listener);
|
||||
|
||||
@@ -67,7 +67,7 @@ class VolumeInterface extends EventEmitter {
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the volume in decibels.
|
||||
* Sets the volume in decibels.
|
||||
* @param {number} db The decibels
|
||||
*/
|
||||
setVolumeDecibels(db) {
|
||||
@@ -75,7 +75,7 @@ class VolumeInterface extends EventEmitter {
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the volume so that a perceived value of 0.5 is half the perceived volume etc.
|
||||
* Sets the volume so that a perceived value of 0.5 is half the perceived volume etc.
|
||||
* @param {number} value The value for the volume
|
||||
*/
|
||||
setVolumeLogarithmic(value) {
|
||||
|
||||
@@ -8,7 +8,7 @@ class GuildDeleteHandler extends AbstractHandler {
|
||||
}
|
||||
|
||||
/**
|
||||
* Emitted whenever a guild is deleted/left.
|
||||
* Emitted whenever a guild kicks the client or the guild is deleted/left.
|
||||
* @event Client#guildDelete
|
||||
* @param {Guild} guild The guild that was deleted
|
||||
*/
|
||||
|
||||
@@ -20,7 +20,7 @@ class ResumedHandler extends AbstractHandler {
|
||||
}
|
||||
|
||||
/**
|
||||
* Emitted whenever a WebSocket resumed.
|
||||
* Emitted whenever a WebSocket resumes.
|
||||
* @event Client#resumed
|
||||
* @param {number} replayed The number of events that were replayed
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user