mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 03:23: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 -
|
* 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>}
|
* @type {ChannelStore<Snowflake, Channel>}
|
||||||
*/
|
*/
|
||||||
this.channels = new ChannelStore(this);
|
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 {string} file The absolute path to the file
|
||||||
* @param {StreamOptions} [options] Options for playing the stream
|
* @param {StreamOptions} [options] Options for playing the stream
|
||||||
* @returns {StreamDispatcher}
|
* @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 {string} input The arbitrary input
|
||||||
* @param {StreamOptions} [options] Options for playing the stream
|
* @param {StreamOptions} [options] Options for playing the stream
|
||||||
* @returns {VoiceBroadcast}
|
* @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() {
|
pause() {
|
||||||
this.paused = true;
|
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() {
|
resume() {
|
||||||
this.paused = false;
|
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() {
|
end() {
|
||||||
this.killCurrentTranscoder();
|
this.killCurrentTranscoder();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* End the current broadcast, all subscribed dispatchers will also end.
|
* Ends the current broadcast, all subscribed dispatchers will also end.
|
||||||
*/
|
*/
|
||||||
destroy() {
|
destroy() {
|
||||||
this.end();
|
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() {
|
disconnect() {
|
||||||
this.emit('closing');
|
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 {string} file The absolute path to the file
|
||||||
* @param {StreamOptions} [options] Options for playing the stream
|
* @param {StreamOptions} [options] Options for playing the stream
|
||||||
* @returns {StreamDispatcher}
|
* @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 {string} input the arbitrary input
|
||||||
* @param {StreamOptions} [options] Options for playing the stream
|
* @param {StreamOptions} [options] Options for playing the stream
|
||||||
* @returns {StreamDispatcher}
|
* @returns {StreamDispatcher}
|
||||||
|
|||||||
@@ -121,8 +121,8 @@ class StreamDispatcher extends VolumeInterface {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the bitrate of the current Opus encoder.
|
* Sets the bitrate of the current Opus encoder.
|
||||||
* @param {number} bitrate New bitrate, in kbps
|
* @param {number} bitrate New bitrate, in kbps.
|
||||||
* If set to 'auto', the voice channel's bitrate will be used
|
* If set to 'auto', the voice channel's bitrate will be used
|
||||||
*/
|
*/
|
||||||
setBitrate(bitrate) {
|
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() {
|
destroy() {
|
||||||
this.voiceConnection.sockets.udp.socket.removeListener('message', this._listener);
|
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
|
* @param {number} db The decibels
|
||||||
*/
|
*/
|
||||||
setVolumeDecibels(db) {
|
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
|
* @param {number} value The value for the volume
|
||||||
*/
|
*/
|
||||||
setVolumeLogarithmic(value) {
|
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
|
* @event Client#guildDelete
|
||||||
* @param {Guild} guild The guild that was deleted
|
* @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
|
* @event Client#resumed
|
||||||
* @param {number} replayed The number of events that were replayed
|
* @param {number} replayed The number of events that were replayed
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ class ShardingManager extends EventEmitter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Send a message to all shards.
|
* Sends a message to all shards.
|
||||||
* @param {*} message Message to be sent to the shards
|
* @param {*} message Message to be sent to the shards
|
||||||
* @returns {Promise<Shard[]>}
|
* @returns {Promise<Shard[]>}
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -25,8 +25,8 @@ class DataStore extends Collection {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Resolves a data entry to a data Object.
|
* Resolves a data entry to a data Object.
|
||||||
* @param {string|Object} idOrInstance The id or instance of something in this datastore
|
* @param {string|Object} idOrInstance The id or instance of something in this DataStore
|
||||||
* @returns {?Object} An instance from this datastore
|
* @returns {?Object} An instance from this DataStore
|
||||||
*/
|
*/
|
||||||
resolve(idOrInstance) {
|
resolve(idOrInstance) {
|
||||||
if (idOrInstance instanceof this.holds) return idOrInstance;
|
if (idOrInstance instanceof this.holds) return idOrInstance;
|
||||||
@@ -36,7 +36,7 @@ class DataStore extends Collection {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Resolves a data entry to a instance ID.
|
* Resolves a data entry to a instance ID.
|
||||||
* @param {string|Instance} idOrInstance The id or instance of something in this datastore
|
* @param {string|Instance} idOrInstance The id or instance of something in this DataStore
|
||||||
* @returns {?string}
|
* @returns {?string}
|
||||||
*/
|
*/
|
||||||
resolveID(idOrInstance) {
|
resolveID(idOrInstance) {
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ class GuildMemberStore extends DataStore {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetch member(s) from Discord, even if they're offline.
|
* Fetches member(s) from Discord, even if they're offline.
|
||||||
* @param {UserResolvable|FetchMemberOptions|FetchMembersOptions} [options] If a UserResolvable, the user to fetch.
|
* @param {UserResolvable|FetchMemberOptions|FetchMembersOptions} [options] If a UserResolvable, the user to fetch.
|
||||||
* If undefined, fetches all members.
|
* If undefined, fetches all members.
|
||||||
* If a query, it limits the results to users with similar usernames.
|
* If a query, it limits the results to users with similar usernames.
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ class Channel extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The time the channel was created
|
* The time the channel was created at
|
||||||
* @type {Date}
|
* @type {Date}
|
||||||
* @readonly
|
* @readonly
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ class ClientApplication extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The time the app was created
|
* The time the app was created at
|
||||||
* @type {Date}
|
* @type {Date}
|
||||||
* @readonly
|
* @readonly
|
||||||
*/
|
*/
|
||||||
@@ -159,7 +159,7 @@ class ClientApplication extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a rich presence asset.
|
* Creates a rich presence asset.
|
||||||
* @param {string} name Name of the asset
|
* @param {string} name Name of the asset
|
||||||
* @param {Base64Resolvable} data Data of the asset
|
* @param {Base64Resolvable} data Data of the asset
|
||||||
* @param {string} type Type of the asset. `big`, or `small`
|
* @param {string} type Type of the asset. `big`, or `small`
|
||||||
@@ -175,7 +175,7 @@ class ClientApplication extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reset the app's secret.
|
* Resets the app's secret.
|
||||||
* <warn>This is only available when using a user account.</warn>
|
* <warn>This is only available when using a user account.</warn>
|
||||||
* @returns {ClientApplication}
|
* @returns {ClientApplication}
|
||||||
*/
|
*/
|
||||||
@@ -185,7 +185,7 @@ class ClientApplication extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reset the app's bot token.
|
* Resets the app's bot token.
|
||||||
* <warn>This is only available when using a user account.</warn>
|
* <warn>This is only available when using a user account.</warn>
|
||||||
* @returns {ClientApplication}
|
* @returns {ClientApplication}
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ class ClientUser extends User {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the username of the logged in client.
|
* Sets the username of the logged in client.
|
||||||
* <info>Changing usernames in Discord is heavily rate limited, with only 2 requests
|
* <info>Changing usernames in Discord is heavily rate limited, with only 2 requests
|
||||||
* every hour. Use this sparingly!</info>
|
* every hour. Use this sparingly!</info>
|
||||||
* @param {string} username The new username
|
* @param {string} username The new username
|
||||||
@@ -168,7 +168,7 @@ class ClientUser extends User {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the avatar of the logged in client.
|
* Sets the avatar of the logged in client.
|
||||||
* @param {BufferResolvable|Base64Resolvable} avatar The new avatar
|
* @param {BufferResolvable|Base64Resolvable} avatar The new avatar
|
||||||
* @returns {Promise<ClientUser>}
|
* @returns {Promise<ClientUser>}
|
||||||
* @example
|
* @example
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ class ClientUserGuildSettings {
|
|||||||
*/
|
*/
|
||||||
Object.defineProperty(this, 'client', { value: client });
|
Object.defineProperty(this, 'client', { value: client });
|
||||||
/**
|
/**
|
||||||
* The ID of the guild this settings are for
|
* The ID of the guild these settings are for
|
||||||
* @type {Snowflake}
|
* @type {Snowflake}
|
||||||
*/
|
*/
|
||||||
this.guildID = data.guild_id;
|
this.guildID = data.guild_id;
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ class ClientUserSettings {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a guild to the list of restricted guilds.
|
* Adds a guild to the list of restricted guilds.
|
||||||
* @param {Guild} guild The guild to add
|
* @param {Guild} guild The guild to add
|
||||||
* @returns {Promise<Guild>}
|
* @returns {Promise<Guild>}
|
||||||
*/
|
*/
|
||||||
@@ -64,7 +64,7 @@ class ClientUserSettings {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove a guild from the list of restricted guilds.
|
* Removes a guild from the list of restricted guilds.
|
||||||
* @param {Guild} guild The guild to remove
|
* @param {Guild} guild The guild to remove
|
||||||
* @returns {Promise<Guild>}
|
* @returns {Promise<Guild>}
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ class Emoji extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The time the emoji was created
|
* The time the emoji was created at
|
||||||
* @type {Date}
|
* @type {Date}
|
||||||
* @readonly
|
* @readonly
|
||||||
*/
|
*/
|
||||||
@@ -126,7 +126,7 @@ class Emoji extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the name of the emoji.
|
* Sets the name of the emoji.
|
||||||
* @param {string} name The new name for the emoji
|
* @param {string} name The new name for the emoji
|
||||||
* @param {string} [reason] Reason for changing the emoji's name
|
* @param {string} [reason] Reason for changing the emoji's name
|
||||||
* @returns {Promise<Emoji>}
|
* @returns {Promise<Emoji>}
|
||||||
@@ -136,7 +136,7 @@ class Emoji extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a role to the list of roles that can use this emoji.
|
* Adds a role to the list of roles that can use this emoji.
|
||||||
* @param {Role} role The role to add
|
* @param {Role} role The role to add
|
||||||
* @returns {Promise<Emoji>}
|
* @returns {Promise<Emoji>}
|
||||||
*/
|
*/
|
||||||
@@ -145,7 +145,7 @@ class Emoji extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add multiple roles to the list of roles that can use this emoji.
|
* Adds multiple roles to the list of roles that can use this emoji.
|
||||||
* @param {Collection<Snowflake, Role>|RoleResolvable[]} roles Roles to add
|
* @param {Collection<Snowflake, Role>|RoleResolvable[]} roles Roles to add
|
||||||
* @returns {Promise<Emoji>}
|
* @returns {Promise<Emoji>}
|
||||||
*/
|
*/
|
||||||
@@ -163,7 +163,7 @@ class Emoji extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove a role from the list of roles that can use this emoji.
|
* Removes a role from the list of roles that can use this emoji.
|
||||||
* @param {Role} role The role to remove
|
* @param {Role} role The role to remove
|
||||||
* @returns {Promise<Emoji>}
|
* @returns {Promise<Emoji>}
|
||||||
*/
|
*/
|
||||||
@@ -172,7 +172,7 @@ class Emoji extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove multiple roles from the list of roles that can use this emoji.
|
* Removes multiple roles from the list of roles that can use this emoji.
|
||||||
* @param {Collection<Snowflake, Role>|RoleResolvable[]} roles Roles to remove
|
* @param {Collection<Snowflake, Role>|RoleResolvable[]} roles Roles to remove
|
||||||
* @returns {Promise<Emoji>}
|
* @returns {Promise<Emoji>}
|
||||||
*/
|
*/
|
||||||
@@ -202,7 +202,7 @@ class Emoji extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete the emoji.
|
* Deletes the emoji.
|
||||||
* @param {string} [reason] Reason for deleting the emoji
|
* @param {string} [reason] Reason for deleting the emoji
|
||||||
* @returns {Promise<Emoji>}
|
* @returns {Promise<Emoji>}
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -232,7 +232,7 @@ class Guild extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The time the guild was created
|
* The time the guild was created at
|
||||||
* @type {Date}
|
* @type {Date}
|
||||||
* @readonly
|
* @readonly
|
||||||
*/
|
*/
|
||||||
@@ -423,7 +423,7 @@ class Guild extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetch a collection of banned users in this guild.
|
* Fetches a collection of banned users in this guild.
|
||||||
* The returned collection contains user objects keyed under `user` and reasons keyed under `reason`.
|
* The returned collection contains user objects keyed under `user` and reasons keyed under `reason`.
|
||||||
* @returns {Promise<Collection<Snowflake, Object>>}
|
* @returns {Promise<Collection<Snowflake, Object>>}
|
||||||
*/
|
*/
|
||||||
@@ -440,7 +440,7 @@ class Guild extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetch a collection of invites to this guild.
|
* Fetches a collection of invites to this guild.
|
||||||
* Resolves with a collection mapping invites by their codes.
|
* Resolves with a collection mapping invites by their codes.
|
||||||
* @returns {Promise<Collection<string, Invite>>}
|
* @returns {Promise<Collection<string, Invite>>}
|
||||||
*/
|
*/
|
||||||
@@ -457,7 +457,7 @@ class Guild extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetch all webhooks for the guild.
|
* Fetches all webhooks for the guild.
|
||||||
* @returns {Promise<Collection<Snowflake, Webhook>>}
|
* @returns {Promise<Collection<Snowflake, Webhook>>}
|
||||||
*/
|
*/
|
||||||
fetchWebhooks() {
|
fetchWebhooks() {
|
||||||
@@ -469,7 +469,7 @@ class Guild extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetch available voice regions.
|
* Fetches available voice regions.
|
||||||
* @returns {Promise<Collection<string, VoiceRegion>>}
|
* @returns {Promise<Collection<string, VoiceRegion>>}
|
||||||
*/
|
*/
|
||||||
fetchVoiceRegions() {
|
fetchVoiceRegions() {
|
||||||
@@ -481,7 +481,7 @@ class Guild extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetch audit logs for this guild.
|
* Fetches audit logs for this guild.
|
||||||
* @param {Object} [options={}] Options for fetching audit logs
|
* @param {Object} [options={}] Options for fetching audit logs
|
||||||
* @param {Snowflake|GuildAuditLogsEntry} [options.before] Limit to entries from before specified entry
|
* @param {Snowflake|GuildAuditLogsEntry} [options.before] Limit to entries from before specified entry
|
||||||
* @param {Snowflake|GuildAuditLogsEntry} [options.after] Limit to entries from after specified entry
|
* @param {Snowflake|GuildAuditLogsEntry} [options.after] Limit to entries from after specified entry
|
||||||
@@ -606,7 +606,7 @@ class Guild extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Edit the level of the explicit content filter.
|
* Edits the level of the explicit content filter.
|
||||||
* @param {number} explicitContentFilter The new level of the explicit content filter
|
* @param {number} explicitContentFilter The new level of the explicit content filter
|
||||||
* @param {string} [reason] Reason for changing the level of the guild's explicit content filter
|
* @param {string} [reason] Reason for changing the level of the guild's explicit content filter
|
||||||
* @returns {Promise<Guild>}
|
* @returns {Promise<Guild>}
|
||||||
@@ -616,7 +616,7 @@ class Guild extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Edit the name of the guild.
|
* Edits the name of the guild.
|
||||||
* @param {string} name The new name of the guild
|
* @param {string} name The new name of the guild
|
||||||
* @param {string} [reason] Reason for changing the guild's name
|
* @param {string} [reason] Reason for changing the guild's name
|
||||||
* @returns {Promise<Guild>}
|
* @returns {Promise<Guild>}
|
||||||
@@ -631,7 +631,7 @@ class Guild extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Edit the region of the guild.
|
* Edits the region of the guild.
|
||||||
* @param {string} region The new region of the guild
|
* @param {string} region The new region of the guild
|
||||||
* @param {string} [reason] Reason for changing the guild's region
|
* @param {string} [reason] Reason for changing the guild's region
|
||||||
* @returns {Promise<Guild>}
|
* @returns {Promise<Guild>}
|
||||||
@@ -646,7 +646,7 @@ class Guild extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Edit the verification level of the guild.
|
* Edits the verification level of the guild.
|
||||||
* @param {number} verificationLevel The new verification level of the guild
|
* @param {number} verificationLevel The new verification level of the guild
|
||||||
* @param {string} [reason] Reason for changing the guild's verification level
|
* @param {string} [reason] Reason for changing the guild's verification level
|
||||||
* @returns {Promise<Guild>}
|
* @returns {Promise<Guild>}
|
||||||
@@ -661,7 +661,7 @@ class Guild extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Edit the AFK channel of the guild.
|
* Edits the AFK channel of the guild.
|
||||||
* @param {ChannelResolvable} afkChannel The new AFK channel
|
* @param {ChannelResolvable} afkChannel The new AFK channel
|
||||||
* @param {string} [reason] Reason for changing the guild's AFK channel
|
* @param {string} [reason] Reason for changing the guild's AFK channel
|
||||||
* @returns {Promise<Guild>}
|
* @returns {Promise<Guild>}
|
||||||
@@ -676,7 +676,7 @@ class Guild extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Edit the system channel of the guild.
|
* Edits the system channel of the guild.
|
||||||
* @param {ChannelResolvable} systemChannel The new system channel
|
* @param {ChannelResolvable} systemChannel The new system channel
|
||||||
* @param {string} [reason] Reason for changing the guild's system channel
|
* @param {string} [reason] Reason for changing the guild's system channel
|
||||||
* @returns {Promise<Guild>}
|
* @returns {Promise<Guild>}
|
||||||
@@ -691,7 +691,7 @@ class Guild extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Edit the AFK timeout of the guild.
|
* Edits the AFK timeout of the guild.
|
||||||
* @param {number} afkTimeout The time in seconds that a user must be idle to be considered AFK
|
* @param {number} afkTimeout The time in seconds that a user must be idle to be considered AFK
|
||||||
* @param {string} [reason] Reason for changing the guild's AFK timeout
|
* @param {string} [reason] Reason for changing the guild's AFK timeout
|
||||||
* @returns {Promise<Guild>}
|
* @returns {Promise<Guild>}
|
||||||
@@ -706,7 +706,7 @@ class Guild extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set a new guild icon.
|
* Sets a new guild icon.
|
||||||
* @param {Base64Resolvable|BufferResolvable} icon The new icon of the guild
|
* @param {Base64Resolvable|BufferResolvable} icon The new icon of the guild
|
||||||
* @param {string} [reason] Reason for changing the guild's icon
|
* @param {string} [reason] Reason for changing the guild's icon
|
||||||
* @returns {Promise<Guild>}
|
* @returns {Promise<Guild>}
|
||||||
@@ -736,7 +736,7 @@ class Guild extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set a new guild splash screen.
|
* Sets a new guild splash screen.
|
||||||
* @param {Base64Resolvable|BufferResolvable} splash The new splash screen of the guild
|
* @param {Base64Resolvable|BufferResolvable} splash The new splash screen of the guild
|
||||||
* @param {string} [reason] Reason for changing the guild's splash screen
|
* @param {string} [reason] Reason for changing the guild's splash screen
|
||||||
* @returns {Promise<Guild>}
|
* @returns {Promise<Guild>}
|
||||||
@@ -779,7 +779,7 @@ class Guild extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Allow direct messages from guild members.
|
* Whether to allow direct messages from guild members.
|
||||||
* <warn>This is only available when using a user account.</warn>
|
* <warn>This is only available when using a user account.</warn>
|
||||||
* @param {boolean} allow Whether to allow direct messages
|
* @param {boolean} allow Whether to allow direct messages
|
||||||
* @returns {Promise<Guild>}
|
* @returns {Promise<Guild>}
|
||||||
@@ -1050,7 +1050,7 @@ class Guild extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Causes the client to leave the guild.
|
* Leaves the guild.
|
||||||
* @returns {Promise<Guild>}
|
* @returns {Promise<Guild>}
|
||||||
* @example
|
* @example
|
||||||
* // Leave a guild
|
* // Leave a guild
|
||||||
@@ -1065,7 +1065,7 @@ class Guild extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Causes the client to delete the guild.
|
* Deletes the guild.
|
||||||
* @returns {Promise<Guild>}
|
* @returns {Promise<Guild>}
|
||||||
* @example
|
* @example
|
||||||
* // Delete a guild
|
* // Delete a guild
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ class GuildAuditLogs {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find target type from entry action.
|
* Finds the target type from the entry action.
|
||||||
* @param {number} target The action target
|
* @param {number} target The action target
|
||||||
* @returns {?string}
|
* @returns {?string}
|
||||||
*/
|
*/
|
||||||
@@ -135,7 +135,7 @@ class GuildAuditLogs {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find action type from entry action.
|
* Finds the action type from the entry action.
|
||||||
* @param {string} action The action target
|
* @param {string} action The action target
|
||||||
* @returns {string}
|
* @returns {string}
|
||||||
*/
|
*/
|
||||||
@@ -321,7 +321,7 @@ class GuildAuditLogsEntry {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The time this entry was created
|
* The time this entry was created at
|
||||||
* @type {Date}
|
* @type {Date}
|
||||||
* @readonly
|
* @readonly
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -160,7 +160,7 @@ class GuildChannel extends Channel {
|
|||||||
/**
|
/**
|
||||||
* Overwrites the permissions for a user or role in this channel.
|
* Overwrites the permissions for a user or role in this channel.
|
||||||
* @param {RoleResolvable|UserResolvable} userOrRole The user or role to update
|
* @param {RoleResolvable|UserResolvable} userOrRole The user or role to update
|
||||||
* @param {PermissionOverwriteOptions} options The configuration for the update
|
* @param {PermissionOverwriteOptions} options The options for the update
|
||||||
* @param {string} [reason] Reason for creating/editing this overwrite
|
* @param {string} [reason] Reason for creating/editing this overwrite
|
||||||
* @returns {Promise<GuildChannel>}
|
* @returns {Promise<GuildChannel>}
|
||||||
* @example
|
* @example
|
||||||
@@ -296,7 +296,7 @@ class GuildChannel extends Channel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set a new name for the guild channel.
|
* Sets a new name for the guild channel.
|
||||||
* @param {string} name The new name for the guild channel
|
* @param {string} name The new name for the guild channel
|
||||||
* @param {string} [reason] Reason for changing the guild channel's name
|
* @param {string} [reason] Reason for changing the guild channel's name
|
||||||
* @returns {Promise<GuildChannel>}
|
* @returns {Promise<GuildChannel>}
|
||||||
@@ -311,7 +311,7 @@ class GuildChannel extends Channel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the category parent of this channel.
|
* Sets the category parent of this channel.
|
||||||
* @param {GuildChannel|Snowflake} channel Parent channel
|
* @param {GuildChannel|Snowflake} channel Parent channel
|
||||||
* @param {boolean} [options.lockPermissions] Lock the permissions to what the parent's permissions are
|
* @param {boolean} [options.lockPermissions] Lock the permissions to what the parent's permissions are
|
||||||
* @param {string} [options.reason] Reason for modifying the parent of this channel
|
* @param {string} [options.reason] Reason for modifying the parent of this channel
|
||||||
@@ -325,7 +325,7 @@ class GuildChannel extends Channel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set a new topic for the guild channel.
|
* Sets a new topic for the guild channel.
|
||||||
* @param {string} topic The new topic for the guild channel
|
* @param {string} topic The new topic for the guild channel
|
||||||
* @param {string} [reason] Reason for changing the guild channel's topic
|
* @param {string} [reason] Reason for changing the guild channel's topic
|
||||||
* @returns {Promise<GuildChannel>}
|
* @returns {Promise<GuildChannel>}
|
||||||
@@ -340,11 +340,11 @@ class GuildChannel extends Channel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set a new position for the guild channel.
|
* Sets a new position for the guild channel.
|
||||||
* @param {number} position The new position for the guild channel
|
* @param {number} position The new position for the guild channel
|
||||||
* @param {Object} [options] Options for setting position
|
* @param {Object} [options] Options for setting position
|
||||||
* @param {boolean} [options.relative=false] Change the position relative to its current value
|
* @param {boolean} [options.relative=false] Change the position relative to its current value
|
||||||
* @param {boolean} [options.reason] Reasion for changing the position
|
* @param {boolean} [options.reason] Reason for changing the position
|
||||||
* @returns {Promise<GuildChannel>}
|
* @returns {Promise<GuildChannel>}
|
||||||
* @example
|
* @example
|
||||||
* // Set a new channel position
|
* // Set a new channel position
|
||||||
@@ -365,7 +365,7 @@ class GuildChannel extends Channel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create an invite to this guild channel.
|
* Creates an invite to this guild channel.
|
||||||
* @param {Object} [options={}] Options for the invite
|
* @param {Object} [options={}] Options for the invite
|
||||||
* @param {boolean} [options.temporary=false] Whether members that joined via the invite should be automatically
|
* @param {boolean} [options.temporary=false] Whether members that joined via the invite should be automatically
|
||||||
* kicked after 24 hours if they have not yet received a role
|
* kicked after 24 hours if they have not yet received a role
|
||||||
@@ -383,7 +383,7 @@ class GuildChannel extends Channel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clone this channel.
|
* Clones this channel.
|
||||||
* @param {Object} [options] The options
|
* @param {Object} [options] The options
|
||||||
* @param {string} [options.name=this.name] Optional name for the new channel, otherwise it has the name
|
* @param {string} [options.name=this.name] Optional name for the new channel, otherwise it has the name
|
||||||
* of this channel
|
* of this channel
|
||||||
|
|||||||
@@ -330,7 +330,7 @@ class GuildMember extends Base {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Edit a guild member.
|
* Edits a guild member.
|
||||||
* @param {GuildMemberEditData} data The data to edit the member with
|
* @param {GuildMemberEditData} data The data to edit the member with
|
||||||
* @param {string} [reason] Reason for editing this user
|
* @param {string} [reason] Reason for editing this user
|
||||||
* @returns {Promise<GuildMember>}
|
* @returns {Promise<GuildMember>}
|
||||||
@@ -362,7 +362,7 @@ class GuildMember extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mute/unmute a user.
|
* Mute/unmutes a user.
|
||||||
* @param {boolean} mute Whether or not the member should be muted
|
* @param {boolean} mute Whether or not the member should be muted
|
||||||
* @param {string} [reason] Reason for muting or unmuting
|
* @param {string} [reason] Reason for muting or unmuting
|
||||||
* @returns {Promise<GuildMember>}
|
* @returns {Promise<GuildMember>}
|
||||||
@@ -372,7 +372,7 @@ class GuildMember extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Deafen/undeafen a user.
|
* Deafen/undeafens a user.
|
||||||
* @param {boolean} deaf Whether or not the member should be deafened
|
* @param {boolean} deaf Whether or not the member should be deafened
|
||||||
* @param {string} [reason] Reason for deafening or undeafening
|
* @param {string} [reason] Reason for deafening or undeafening
|
||||||
* @returns {Promise<GuildMember>}
|
* @returns {Promise<GuildMember>}
|
||||||
@@ -479,7 +479,7 @@ class GuildMember extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the nickname for the guild member.
|
* Sets the nickname for the guild member.
|
||||||
* @param {string} nick The nickname for the guild member
|
* @param {string} nick The nickname for the guild member
|
||||||
* @param {string} [reason] Reason for setting the nickname
|
* @param {string} [reason] Reason for setting the nickname
|
||||||
* @returns {Promise<GuildMember>}
|
* @returns {Promise<GuildMember>}
|
||||||
@@ -505,7 +505,7 @@ class GuildMember extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Kick this member from the guild.
|
* Kicks this member from the guild.
|
||||||
* @param {string} [reason] Reason for kicking user
|
* @param {string} [reason] Reason for kicking user
|
||||||
* @returns {Promise<GuildMember>}
|
* @returns {Promise<GuildMember>}
|
||||||
*/
|
*/
|
||||||
@@ -520,7 +520,7 @@ class GuildMember extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Ban this guild member.
|
* Bans this guild member.
|
||||||
* @param {Object|number|string} [options] Ban options. If a number, the number of days to delete messages for, if a
|
* @param {Object|number|string} [options] Ban options. If a number, the number of days to delete messages for, if a
|
||||||
* string, the ban reason. Supplying an object allows you to do both.
|
* string, the ban reason. Supplying an object allows you to do both.
|
||||||
* @param {number} [options.days=0] Number of days of messages to delete
|
* @param {number} [options.days=0] Number of days of messages to delete
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ class Invite extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The time the invite was created
|
* The time the invite was created at
|
||||||
* @type {Date}
|
* @type {Date}
|
||||||
* @readonly
|
* @readonly
|
||||||
*/
|
*/
|
||||||
@@ -113,7 +113,7 @@ class Invite extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The time the invite will expire
|
* The time the invite will expire at
|
||||||
* @type {Date}
|
* @type {Date}
|
||||||
* @readonly
|
* @readonly
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ class Message extends Base {
|
|||||||
this.author = this.client.users.create(data.author, !data.webhook_id);
|
this.author = this.client.users.create(data.author, !data.webhook_id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents the author of the message as a guild member
|
* Represents the author of the message as a guild member.
|
||||||
* Only available if the message comes from a guild where the author is still a member
|
* Only available if the message comes from a guild where the author is still a member
|
||||||
* @type {?GuildMember}
|
* @type {?GuildMember}
|
||||||
*/
|
*/
|
||||||
@@ -202,7 +202,7 @@ class Message extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The time the message was sent
|
* The time the message was sent at
|
||||||
* @type {Date}
|
* @type {Date}
|
||||||
* @readonly
|
* @readonly
|
||||||
*/
|
*/
|
||||||
@@ -358,7 +358,7 @@ class Message extends Base {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Edit the content of the message.
|
* Edits the content of the message.
|
||||||
* @param {StringResolvable} [content] The new content for the message
|
* @param {StringResolvable} [content] The new content for the message
|
||||||
* @param {MessageEditOptions|MessageEmbed} [options] The options to provide
|
* @param {MessageEditOptions|MessageEmbed} [options] The options to provide
|
||||||
* @returns {Promise<Message>}
|
* @returns {Promise<Message>}
|
||||||
@@ -426,7 +426,7 @@ class Message extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a reaction to the message.
|
* Adds a reaction to the message.
|
||||||
* @param {EmojiIdentifierResolvable} emoji The emoji to react with
|
* @param {EmojiIdentifierResolvable} emoji The emoji to react with
|
||||||
* @returns {Promise<MessageReaction>}
|
* @returns {Promise<MessageReaction>}
|
||||||
*/
|
*/
|
||||||
@@ -445,7 +445,7 @@ class Message extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove all reactions from a message.
|
* Removes all reactions from a message.
|
||||||
* @returns {Promise<Message>}
|
* @returns {Promise<Message>}
|
||||||
*/
|
*/
|
||||||
clearReactions() {
|
clearReactions() {
|
||||||
@@ -484,7 +484,7 @@ class Message extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reply to the message.
|
* Replies to the message.
|
||||||
* @param {StringResolvable} [content] The content for the message
|
* @param {StringResolvable} [content] The content for the message
|
||||||
* @param {MessageOptions} [options] The options to provide
|
* @param {MessageOptions} [options] The options to provide
|
||||||
* @returns {Promise<Message|Message[]>}
|
* @returns {Promise<Message|Message[]>}
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ class MessageAttachment {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the file of this attachment.
|
* Sets the file of this attachment.
|
||||||
* @param {BufferResolvable|Stream} file The file
|
* @param {BufferResolvable|Stream} file The file
|
||||||
* @param {string} name The name of the file
|
* @param {string} name The name of the file
|
||||||
* @returns {MessageAttachment} This attachment
|
* @returns {MessageAttachment} This attachment
|
||||||
@@ -41,7 +41,7 @@ class MessageAttachment {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the file of this attachment.
|
* Sets the file of this attachment.
|
||||||
* @param {BufferResolvable|Stream} attachment The file
|
* @param {BufferResolvable|Stream} attachment The file
|
||||||
* @returns {MessageAttachment} This attachment
|
* @returns {MessageAttachment} This attachment
|
||||||
*/
|
*/
|
||||||
@@ -51,7 +51,7 @@ class MessageAttachment {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the name of this attachment.
|
* Sets the name of this attachment.
|
||||||
* @param {string} name The name of the image
|
* @param {string} name The name of the image
|
||||||
* @returns {MessageAttachment} This attachment
|
* @returns {MessageAttachment} This attachment
|
||||||
*/
|
*/
|
||||||
@@ -61,7 +61,7 @@ class MessageAttachment {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the file of this attachment.
|
* Sets the file of this attachment.
|
||||||
* @param {BufferResolvable|Stream} file The file
|
* @param {BufferResolvable|Stream} file The file
|
||||||
* @param {string} name The name of the file
|
* @param {string} name The name of the file
|
||||||
* @private
|
* @private
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ class MessageCollector extends Collector {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle a message for possible collection.
|
* Handles a message for possible collection.
|
||||||
* @param {Message} message The message that could be collected
|
* @param {Message} message The message that could be collected
|
||||||
* @returns {?{key: Snowflake, value: Message}}
|
* @returns {?{key: Snowflake, value: Message}}
|
||||||
* @private
|
* @private
|
||||||
@@ -64,7 +64,7 @@ class MessageCollector extends Collector {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle a message for possible disposal.
|
* Handles a message for possible disposal.
|
||||||
* @param {Message} message The message that could be disposed
|
* @param {Message} message The message that could be disposed
|
||||||
* @returns {?string}
|
* @returns {?string}
|
||||||
*/
|
*/
|
||||||
@@ -73,7 +73,7 @@ class MessageCollector extends Collector {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check after un/collection to see if the collector is done.
|
* Checks after un/collection to see if the collector is done.
|
||||||
* @returns {?string}
|
* @returns {?string}
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ class MessageEmbed {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The date this embed was created
|
* The date this embed was created at
|
||||||
* @type {?Date}
|
* @type {?Date}
|
||||||
* @readonly
|
* @readonly
|
||||||
*/
|
*/
|
||||||
@@ -254,7 +254,7 @@ class MessageEmbed {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the image of this embed.
|
* Sets the image of this embed.
|
||||||
* @param {string} url The URL of the image
|
* @param {string} url The URL of the image
|
||||||
* @returns {MessageEmbed}
|
* @returns {MessageEmbed}
|
||||||
*/
|
*/
|
||||||
@@ -264,7 +264,7 @@ class MessageEmbed {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the thumbnail of this embed.
|
* Sets the thumbnail of this embed.
|
||||||
* @param {string} url The URL of the thumbnail
|
* @param {string} url The URL of the thumbnail
|
||||||
* @returns {MessageEmbed}
|
* @returns {MessageEmbed}
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ class MessageReaction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetch all the users that gave this reaction. Resolves with a collection of users, mapped by their IDs.
|
* Fetches all the users that gave this reaction. Resolves with a collection of users, mapped by their IDs.
|
||||||
* @param {Object} [options] Options for fetching the users
|
* @param {Object} [options] Options for fetching the users
|
||||||
* @param {number} [options.limit=100] The maximum amount of users to fetch, defaults to 100
|
* @param {number} [options.limit=100] The maximum amount of users to fetch, defaults to 100
|
||||||
* @param {Snowflake} [options.after] Limit fetching users to those with an id greater than the supplied id
|
* @param {Snowflake} [options.after] Limit fetching users to those with an id greater than the supplied id
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ class PermissionOverwrites {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete this Permission Overwrite.
|
* Deletes this Permission Overwrite.
|
||||||
* @param {string} [reason] Reason for deleting this overwrite
|
* @param {string} [reason] Reason for deleting this overwrite
|
||||||
* @returns {Promise<PermissionOverwrites>}
|
* @returns {Promise<PermissionOverwrites>}
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -147,34 +147,35 @@ class RichPresenceAssets {
|
|||||||
Object.defineProperty(this, 'activity', { value: activity });
|
Object.defineProperty(this, 'activity', { value: activity });
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hover text for large image
|
* Hover text for the large image
|
||||||
* @type {?string}
|
* @type {?string}
|
||||||
*/
|
*/
|
||||||
this.largeText = assets.large_text || null;
|
this.largeText = assets.large_text || null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hover text for small image
|
* Hover text for the small image
|
||||||
* @type {?string}
|
* @type {?string}
|
||||||
*/
|
*/
|
||||||
this.smallText = assets.small_text || null;
|
this.smallText = assets.small_text || null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ID of large image asset
|
* ID of the large image asset
|
||||||
* @type {?string}
|
* @type {?string}
|
||||||
*/
|
*/
|
||||||
this.largeImage = assets.large_image || null;
|
this.largeImage = assets.large_image || null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ID of small image asset
|
* ID of the small image asset
|
||||||
* @type {?string}
|
* @type {?string}
|
||||||
*/
|
*/
|
||||||
this.smallImage = assets.small_image || null;
|
this.smallImage = assets.small_image || null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Gets the URL of the small image asset
|
||||||
* @param {string} format Format of the image
|
* @param {string} format Format of the image
|
||||||
* @param {number} size Size of the iamge
|
* @param {number} size Size of the image
|
||||||
* @returns {?string} small image url
|
* @returns {?string} The small image URL
|
||||||
*/
|
*/
|
||||||
smallImageURL({ format, size } = {}) {
|
smallImageURL({ format, size } = {}) {
|
||||||
if (!this.smallImage) return null;
|
if (!this.smallImage) return null;
|
||||||
@@ -183,9 +184,10 @@ class RichPresenceAssets {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Gets the URL of the large image asset
|
||||||
* @param {string} format Format of the image
|
* @param {string} format Format of the image
|
||||||
* @param {number} size Size of the iamge
|
* @param {number} size Size of the image
|
||||||
* @returns {?string} large image url
|
* @returns {?string} The large image URL
|
||||||
*/
|
*/
|
||||||
largeImageURL({ format, size } = {}) {
|
largeImageURL({ format, size } = {}) {
|
||||||
if (!this.largeImage) return null;
|
if (!this.largeImage) return null;
|
||||||
|
|||||||
@@ -23,13 +23,13 @@ class ReactionCollector extends Collector {
|
|||||||
super(message.client, filter, options);
|
super(message.client, filter, options);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The message
|
* The message upon which to collect reactions
|
||||||
* @type {Message}
|
* @type {Message}
|
||||||
*/
|
*/
|
||||||
this.message = message;
|
this.message = message;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The users which have reacted
|
* The users which have reacted to this message
|
||||||
* @type {Collection}
|
* @type {Collection}
|
||||||
*/
|
*/
|
||||||
this.users = new Collection();
|
this.users = new Collection();
|
||||||
@@ -64,7 +64,7 @@ class ReactionCollector extends Collector {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle an incoming reaction for possible collection.
|
* Handles an incoming reaction for possible collection.
|
||||||
* @param {MessageReaction} reaction The reaction to possibly collect
|
* @param {MessageReaction} reaction The reaction to possibly collect
|
||||||
* @returns {?{key: Snowflake, value: MessageReaction}}
|
* @returns {?{key: Snowflake, value: MessageReaction}}
|
||||||
* @private
|
* @private
|
||||||
@@ -78,7 +78,7 @@ class ReactionCollector extends Collector {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle a reaction deletion for possible disposal.
|
* Handles a reaction deletion for possible disposal.
|
||||||
* @param {MessageReaction} reaction The reaction to possibly dispose
|
* @param {MessageReaction} reaction The reaction to possibly dispose
|
||||||
* @returns {?Snowflake|string}
|
* @returns {?Snowflake|string}
|
||||||
*/
|
*/
|
||||||
@@ -87,7 +87,7 @@ class ReactionCollector extends Collector {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Empty this reaction collector.
|
* Empties this reaction collector.
|
||||||
*/
|
*/
|
||||||
empty() {
|
empty() {
|
||||||
this.total = 0;
|
this.total = 0;
|
||||||
@@ -104,7 +104,7 @@ class ReactionCollector extends Collector {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the collector key for a reaction.
|
* Gets the collector key for a reaction.
|
||||||
* @param {MessageReaction} reaction The message reaction to get the key for
|
* @param {MessageReaction} reaction The message reaction to get the key for
|
||||||
* @returns {Snowflake|string}
|
* @returns {Snowflake|string}
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ class Role extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The time the role was created
|
* The time the role was created at
|
||||||
* @type {Date}
|
* @type {Date}
|
||||||
* @readonly
|
* @readonly
|
||||||
*/
|
*/
|
||||||
@@ -187,7 +187,7 @@ class Role extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set a new name for the role.
|
* Sets a new name for the role.
|
||||||
* @param {string} name The new name of the role
|
* @param {string} name The new name of the role
|
||||||
* @param {string} [reason] Reason for changing the role's name
|
* @param {string} [reason] Reason for changing the role's name
|
||||||
* @returns {Promise<Role>}
|
* @returns {Promise<Role>}
|
||||||
@@ -202,7 +202,7 @@ class Role extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set a new color for the role.
|
* Sets a new color for the role.
|
||||||
* @param {ColorResolvable} color The color of the role
|
* @param {ColorResolvable} color The color of the role
|
||||||
* @param {string} [reason] Reason for changing the role's color
|
* @param {string} [reason] Reason for changing the role's color
|
||||||
* @returns {Promise<Role>}
|
* @returns {Promise<Role>}
|
||||||
@@ -217,7 +217,7 @@ class Role extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set whether or not the role should be hoisted.
|
* Sets whether or not the role should be hoisted.
|
||||||
* @param {boolean} hoist Whether or not to hoist the role
|
* @param {boolean} hoist Whether or not to hoist the role
|
||||||
* @param {string} [reason] Reason for setting whether or not the role should be hoisted
|
* @param {string} [reason] Reason for setting whether or not the role should be hoisted
|
||||||
* @returns {Promise<Role>}
|
* @returns {Promise<Role>}
|
||||||
@@ -232,7 +232,7 @@ class Role extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the permissions of the role.
|
* Sets the permissions of the role.
|
||||||
* @param {PermissionResolvable[]} permissions The permissions of the role
|
* @param {PermissionResolvable[]} permissions The permissions of the role
|
||||||
* @param {string} [reason] Reason for changing the role's permissions
|
* @param {string} [reason] Reason for changing the role's permissions
|
||||||
* @returns {Promise<Role>}
|
* @returns {Promise<Role>}
|
||||||
@@ -247,7 +247,7 @@ class Role extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set whether this role is mentionable.
|
* Sets whether this role is mentionable.
|
||||||
* @param {boolean} mentionable Whether this role should be mentionable
|
* @param {boolean} mentionable Whether this role should be mentionable
|
||||||
* @param {string} [reason] Reason for setting whether or not this role should be mentionable
|
* @param {string} [reason] Reason for setting whether or not this role should be mentionable
|
||||||
* @returns {Promise<Role>}
|
* @returns {Promise<Role>}
|
||||||
@@ -262,11 +262,11 @@ class Role extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the position of the role.
|
* Sets the position of the role.
|
||||||
* @param {number} position The position of the role
|
* @param {number} position The position of the role
|
||||||
* @param {Object} [options] Options for setting position
|
* @param {Object} [options] Options for setting position
|
||||||
* @param {boolean} [options.relative=false] Change the position relative to its current value
|
* @param {boolean} [options.relative=false] Change the position relative to its current value
|
||||||
* @param {boolean} [options.reason] Reasion for changing the position
|
* @param {boolean} [options.reason] Reason for changing the position
|
||||||
* @returns {Promise<Role>}
|
* @returns {Promise<Role>}
|
||||||
* @example
|
* @example
|
||||||
* // Set the position of the role
|
* // Set the position of the role
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ class TextChannel extends GuildChannel {
|
|||||||
this.topic = data.topic;
|
this.topic = data.topic;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If the Discord considers this channel NSFW
|
* If the guild considers this channel NSFW
|
||||||
* @type {boolean}
|
* @type {boolean}
|
||||||
* @readonly
|
* @readonly
|
||||||
*/
|
*/
|
||||||
@@ -39,7 +39,7 @@ class TextChannel extends GuildChannel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetch all webhooks for the channel.
|
* Fetches all webhooks for the channel.
|
||||||
* @returns {Promise<Collection<Snowflake, Webhook>>}
|
* @returns {Promise<Collection<Snowflake, Webhook>>}
|
||||||
*/
|
*/
|
||||||
fetchWebhooks() {
|
fetchWebhooks() {
|
||||||
@@ -51,7 +51,7 @@ class TextChannel extends GuildChannel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a webhook for the channel.
|
* Creates a webhook for the channel.
|
||||||
* @param {string} name The name of the webhook
|
* @param {string} name The name of the webhook
|
||||||
* @param {Object} [options] Options for creating the webhook
|
* @param {Object} [options] Options for creating the webhook
|
||||||
* @param {BufferResolvable|Base64Resolvable} [options.avatar] Avatar for the webhook
|
* @param {BufferResolvable|Base64Resolvable} [options.avatar] Avatar for the webhook
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ class User extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The time the user was created
|
* The time the user was created at
|
||||||
* @type {Date}
|
* @type {Date}
|
||||||
* @readonly
|
* @readonly
|
||||||
*/
|
*/
|
||||||
@@ -134,7 +134,7 @@ class User extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Discord "tag" for this user
|
* The Discord "tag" (e.g. `hydrabolt#0086`) for this user
|
||||||
* @type {string}
|
* @type {string}
|
||||||
* @readonly
|
* @readonly
|
||||||
*/
|
*/
|
||||||
@@ -153,7 +153,7 @@ class User extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check whether the user is typing in a channel.
|
* Checks whether the user is typing in a channel.
|
||||||
* @param {ChannelResolvable} channel The channel to check in
|
* @param {ChannelResolvable} channel The channel to check in
|
||||||
* @returns {boolean}
|
* @returns {boolean}
|
||||||
*/
|
*/
|
||||||
@@ -163,7 +163,7 @@ class User extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the time that the user started typing.
|
* Gets the time that the user started typing.
|
||||||
* @param {ChannelResolvable} channel The channel to get the time in
|
* @param {ChannelResolvable} channel The channel to get the time in
|
||||||
* @returns {?Date}
|
* @returns {?Date}
|
||||||
*/
|
*/
|
||||||
@@ -173,7 +173,7 @@ class User extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.
|
* Gets the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.
|
||||||
* @param {ChannelResolvable} channel The channel to get the time in
|
* @param {ChannelResolvable} channel The channel to get the time in
|
||||||
* @returns {number}
|
* @returns {number}
|
||||||
*/
|
*/
|
||||||
@@ -214,7 +214,7 @@ class User extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the profile of the user.
|
* Gets the profile of the user.
|
||||||
* <warn>This is only available when using a user account.</warn>
|
* <warn>This is only available when using a user account.</warn>
|
||||||
* @returns {Promise<UserProfile>}
|
* @returns {Promise<UserProfile>}
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ class Webhook {
|
|||||||
|
|
||||||
/* eslint-disable max-len */
|
/* eslint-disable max-len */
|
||||||
/**
|
/**
|
||||||
* Send a message with this webhook.
|
* Sends a message with this webhook.
|
||||||
* @param {StringResolvable} [content] The content to send
|
* @param {StringResolvable} [content] The content to send
|
||||||
* @param {WebhookMessageOptions|MessageEmbed|MessageAttachment|MessageAttachment[]} [options={}] The options to provide
|
* @param {WebhookMessageOptions|MessageEmbed|MessageAttachment|MessageAttachment[]} [options={}] The options to provide
|
||||||
* @returns {Promise<Message|Object>}
|
* @returns {Promise<Message|Object>}
|
||||||
@@ -212,7 +212,7 @@ class Webhook {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Send a raw slack message with this webhook.
|
* Sends a raw slack message with this webhook.
|
||||||
* @param {Object} body The raw body to send
|
* @param {Object} body The raw body to send
|
||||||
* @returns {Promise<Message|Object>}
|
* @returns {Promise<Message|Object>}
|
||||||
* @example
|
* @example
|
||||||
@@ -240,7 +240,7 @@ class Webhook {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Edit the webhook.
|
* Edits the webhook.
|
||||||
* @param {Object} options Options
|
* @param {Object} options Options
|
||||||
* @param {string} [options.name=this.name] New name for this webhook
|
* @param {string} [options.name=this.name] New name for this webhook
|
||||||
* @param {BufferResolvable} [options.avatar] New avatar for this webhook
|
* @param {BufferResolvable} [options.avatar] New avatar for this webhook
|
||||||
@@ -262,7 +262,7 @@ class Webhook {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete the webhook.
|
* Deletes the webhook.
|
||||||
* @param {string} [reason] Reason for deleting this webhook
|
* @param {string} [reason] Reason for deleting this webhook
|
||||||
* @returns {Promise}
|
* @returns {Promise}
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ class Collector extends EventEmitter {
|
|||||||
super();
|
super();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The client
|
* The client that instantiated this Collector
|
||||||
* @name Collector#client
|
* @name Collector#client
|
||||||
* @type {Client}
|
* @type {Client}
|
||||||
* @readonly
|
* @readonly
|
||||||
@@ -115,7 +115,7 @@ class Collector extends EventEmitter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a promise that resolves with the next collected element;
|
* Returns a promise that resolves with the next collected element;
|
||||||
* rejects with collected elements if the collector finishes without receving a next element
|
* rejects with collected elements if the collector finishes without receving a next element
|
||||||
* @type {Promise}
|
* @type {Promise}
|
||||||
* @readonly
|
* @readonly
|
||||||
@@ -148,7 +148,7 @@ class Collector extends EventEmitter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stop this collector and emit the `end` event.
|
* Stops this collector and emits the `end` event.
|
||||||
* @param {string} [reason='user'] The reason this collector is ending
|
* @param {string} [reason='user'] The reason this collector is ending
|
||||||
* @emits Collector#end
|
* @emits Collector#end
|
||||||
*/
|
*/
|
||||||
@@ -168,7 +168,7 @@ class Collector extends EventEmitter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check whether the collector should end, and if so, end it.
|
* Checks whether the collector should end, and if so, ends it.
|
||||||
*/
|
*/
|
||||||
checkEnd() {
|
checkEnd() {
|
||||||
const reason = this.endReason();
|
const reason = this.endReason();
|
||||||
|
|||||||
@@ -67,12 +67,12 @@ class TextBasedChannel {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Send a message to this channel.
|
* Sends a message to this channel.
|
||||||
* @param {StringResolvable} [content] Text for the message
|
* @param {StringResolvable} [content] Text for the message
|
||||||
* @param {MessageOptions|MessageEmbed|MessageAttachment|MessageAttachment[]} [options={}] Options for the message
|
* @param {MessageOptions|MessageEmbed|MessageAttachment|MessageAttachment[]} [options={}] Options for the message
|
||||||
* @returns {Promise<Message|Message[]>}
|
* @returns {Promise<Message|Message[]>}
|
||||||
* @example
|
* @example
|
||||||
* // Send a message
|
* // Sends a message
|
||||||
* channel.send('hello!')
|
* channel.send('hello!')
|
||||||
* .then(message => console.log(`Sent message: ${message.content}`))
|
* .then(message => console.log(`Sent message: ${message.content}`))
|
||||||
* .catch(console.error);
|
* .catch(console.error);
|
||||||
@@ -274,7 +274,7 @@ class TextBasedChannel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Bulk delete given messages that are newer than two weeks.
|
* Bulk deletes given messages that are newer than two weeks.
|
||||||
* <warn>This is only available when using a bot account.</warn>
|
* <warn>This is only available when using a bot account.</warn>
|
||||||
* @param {Collection<Snowflake, Message>|Message[]|Snowflake[]|number} messages
|
* @param {Collection<Snowflake, Message>|Message[]|Snowflake[]|number} messages
|
||||||
* Messages or number of messages to delete
|
* Messages or number of messages to delete
|
||||||
|
|||||||
@@ -370,8 +370,8 @@ exports.MessageNotificationTypes = [
|
|||||||
|
|
||||||
exports.UserSettingsMap = {
|
exports.UserSettingsMap = {
|
||||||
/**
|
/**
|
||||||
* Automatically convert emoticons in your messages to emoji
|
* Automatically convert emoticons in your messages to emoji,
|
||||||
* For example, when you type `:-)` Discord will convert it to 😃
|
* for example when you type `:-)` Discord will convert it to 😃
|
||||||
* @name ClientUserSettings#convertEmoticons
|
* @name ClientUserSettings#convertEmoticons
|
||||||
* @type {boolean}
|
* @type {boolean}
|
||||||
*/
|
*/
|
||||||
@@ -434,7 +434,7 @@ exports.UserSettingsMap = {
|
|||||||
inline_attachment_media: 'inlineAttachmentMedia',
|
inline_attachment_media: 'inlineAttachmentMedia',
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Display images, videos, and lolcats when uploaded posted as links in chat
|
* Display images, videos, and lolcats when posted as links in chat
|
||||||
* @name ClientUserSettings#inlineEmbedMedia
|
* @name ClientUserSettings#inlineEmbedMedia
|
||||||
* @type {boolean}
|
* @type {boolean}
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -41,17 +41,17 @@ class Permissions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Freezes the permission making it immutable.
|
* Freezes these permissions, making them immutable.
|
||||||
* @returns {Permissions} This permissions
|
* @returns {Permissions} These permissions
|
||||||
*/
|
*/
|
||||||
freeze() {
|
freeze() {
|
||||||
return Object.freeze(this);
|
return Object.freeze(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds permissions to this one.
|
* Adds permissions to these ones.
|
||||||
* @param {...PermissionResolvable} permissions Permissions to add
|
* @param {...PermissionResolvable} permissions Permissions to add
|
||||||
* @returns {Permissions} This permissions or new permissions if the instance is frozen.
|
* @returns {Permissions} These permissions or new permissions if the instance is frozen.
|
||||||
*/
|
*/
|
||||||
add(...permissions) {
|
add(...permissions) {
|
||||||
let total = 0;
|
let total = 0;
|
||||||
@@ -65,9 +65,9 @@ class Permissions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes permissions from this one.
|
* Removes permissions from these.
|
||||||
* @param {...PermissionResolvable} permissions Permissions to remove
|
* @param {...PermissionResolvable} permissions Permissions to remove
|
||||||
* @returns {Permissions} This permissions or new permissions if the instance is frozen.
|
* @returns {Permissions} These permissions or new permissions if the instance is frozen.
|
||||||
*/
|
*/
|
||||||
remove(...permissions) {
|
remove(...permissions) {
|
||||||
let total = 0;
|
let total = 0;
|
||||||
|
|||||||
@@ -293,7 +293,7 @@ class Util {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sort by discord's position then ID thing
|
* Sorts by Discord's position and then by ID.
|
||||||
* @param {Collection} collection Collection of objects to sort
|
* @param {Collection} collection Collection of objects to sort
|
||||||
* @returns {Collection}
|
* @returns {Collection}
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user