mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
fix: actually fix Readonly typos
This commit is contained in:
@@ -51,7 +51,7 @@ class VoiceConnection extends EventEmitter {
|
||||
|
||||
/**
|
||||
* Our current speaking state
|
||||
* @type {ReadOnly<Speaking>}
|
||||
* @type {Readonly<Speaking>}
|
||||
*/
|
||||
this.speaking = new Speaking().freeze();
|
||||
|
||||
@@ -97,7 +97,7 @@ class VoiceConnection extends EventEmitter {
|
||||
|
||||
/**
|
||||
* Tracks which users are talking
|
||||
* @type {Map<Snowflake, ReadOnly<Speaking>>}
|
||||
* @type {Map<Snowflake, Readonly<Speaking>>}
|
||||
* @private
|
||||
*/
|
||||
this._speaking = new Map();
|
||||
@@ -443,7 +443,7 @@ class VoiceConnection extends EventEmitter {
|
||||
* Emitted whenever a user changes speaking state.
|
||||
* @event VoiceConnection#speaking
|
||||
* @param {User} user The user that has changed speaking state
|
||||
* @param {ReadOnly<Speaking>} speaking The speaking state of the user
|
||||
* @param {Readonly<Speaking>} speaking The speaking state of the user
|
||||
*/
|
||||
if (this.status === VoiceStatus.CONNECTED) {
|
||||
this.emit('speaking', user, speaking);
|
||||
@@ -459,7 +459,7 @@ class VoiceConnection extends EventEmitter {
|
||||
* Emitted once a guild member changes speaking state.
|
||||
* @event Client#guildMemberSpeaking
|
||||
* @param {GuildMember} member The member that started/stopped speaking
|
||||
* @param {ReadOnly<Speaking>} speaking The speaking state of the member
|
||||
* @param {Readonly<Speaking>} speaking The speaking state of the member
|
||||
*/
|
||||
this.client.emit(Events.GUILD_MEMBER_SPEAKING, member, speaking);
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ class GuildChannel extends Channel {
|
||||
/**
|
||||
* Gets the overall set of permissions for a member in this channel, taking into account channel overwrites.
|
||||
* @param {GuildMember} member The member to obtain the overall permissions for
|
||||
* @returns {ReadOnly<Permissions>}
|
||||
* @returns {Readonly<Permissions>}
|
||||
* @private
|
||||
*/
|
||||
memberPermissions(member) {
|
||||
@@ -159,7 +159,7 @@ class GuildChannel extends Channel {
|
||||
/**
|
||||
* Gets the overall set of permissions for a role in this channel, taking into account channel overwrites.
|
||||
* @param {Role} role The role to obtain the overall permissions for
|
||||
* @returns {ReadOnly<Permissions>}
|
||||
* @returns {Readonly<Permissions>}
|
||||
* @private
|
||||
*/
|
||||
rolePermissions(role) {
|
||||
|
||||
@@ -168,7 +168,7 @@ class GuildMember extends Base {
|
||||
|
||||
/**
|
||||
* The overall set of permissions for this member, taking only roles into account
|
||||
* @type {ReadOnly<Permissions>}
|
||||
* @type {Readonly<Permissions>}
|
||||
* @readonly
|
||||
*/
|
||||
get permissions() {
|
||||
@@ -209,7 +209,7 @@ class GuildMember extends Base {
|
||||
* Returns `channel.permissionsFor(guildMember)`. Returns permissions for a member in a guild channel,
|
||||
* taking into account roles and permission overwrites.
|
||||
* @param {ChannelResolvable} channel The guild channel to use as context
|
||||
* @returns {ReadOnly<Permissions>}
|
||||
* @returns {Readonly<Permissions>}
|
||||
*/
|
||||
permissionsIn(channel) {
|
||||
channel = this.guild.channels.resolve(channel);
|
||||
|
||||
@@ -39,13 +39,13 @@ class PermissionOverwrites {
|
||||
|
||||
/**
|
||||
* The permissions that are denied for the user or role.
|
||||
* @type {ReadOnly<Permissions>}
|
||||
* @type {Readonly<Permissions>}
|
||||
*/
|
||||
this.deny = new Permissions(data.deny).freeze();
|
||||
|
||||
/**
|
||||
* The permissions that are allowed for the user or role.
|
||||
* @type {ReadOnly<Permissions>}
|
||||
* @type {Readonly<Permissions>}
|
||||
*/
|
||||
this.allow = new Permissions(data.allow).freeze();
|
||||
}
|
||||
|
||||
@@ -154,7 +154,7 @@ class Activity {
|
||||
|
||||
/**
|
||||
* Flags that describe the activity
|
||||
* @type {ReadOnly<ActivityFlags>}
|
||||
* @type {Readonly<ActivityFlags>}
|
||||
*/
|
||||
this.flags = new ActivityFlags(data.flags).freeze();
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ class Role extends Base {
|
||||
|
||||
/**
|
||||
* The permissions of the role
|
||||
* @type {ReadOnly<Permissions>}
|
||||
* @type {Readonly<Permissions>}
|
||||
*/
|
||||
this.permissions = new Permissions(data.permissions).freeze();
|
||||
|
||||
@@ -203,7 +203,7 @@ class Role extends Base {
|
||||
* Returns `channel.permissionsFor(role)`. Returns permissions for a role in a guild channel,
|
||||
* taking into account permission overwrites.
|
||||
* @param {ChannelResolvable} channel The guild channel to use as context
|
||||
* @returns {ReadOnly<Permissions>}
|
||||
* @returns {Readonly<Permissions>}
|
||||
*/
|
||||
permissionsIn(channel) {
|
||||
channel = this.guild.channels.resolve(channel);
|
||||
|
||||
@@ -48,7 +48,7 @@ class BitField {
|
||||
|
||||
/**
|
||||
* Freezes these bits, making them immutable.
|
||||
* @returns {ReadOnly<BitField>} These bits
|
||||
* @returns {Readonly<BitField>} These bits
|
||||
*/
|
||||
freeze() {
|
||||
return Object.freeze(this);
|
||||
|
||||
Reference in New Issue
Block a user