mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 16:43:31 +01:00
fix types for snowflakes (#1156)
* fix types for snowflakes * Update TextBasedChannel.js
This commit is contained in:
committed by
Schuyler Cebulskie
parent
0b5eeb08f3
commit
59ff1d99ba
@@ -92,26 +92,26 @@ class Client extends EventEmitter {
|
||||
|
||||
/**
|
||||
* A collection of the Client's stored users
|
||||
* @type {Collection<string, User>}
|
||||
* @type {Collection<Snowflake, User>}
|
||||
*/
|
||||
this.users = new Collection();
|
||||
|
||||
/**
|
||||
* A collection of the Client's stored guilds
|
||||
* @type {Collection<string, Guild>}
|
||||
* @type {Collection<Snowflake, Guild>}
|
||||
*/
|
||||
this.guilds = new Collection();
|
||||
|
||||
/**
|
||||
* A collection of the Client's stored channels
|
||||
* @type {Collection<string, Channel>}
|
||||
* @type {Collection<Snowflake, Channel>}
|
||||
*/
|
||||
this.channels = new Collection();
|
||||
|
||||
/**
|
||||
* A collection of presences for friends of the logged in user.
|
||||
* <warn>This is only filled when using a user account.</warn>
|
||||
* @type {Collection<string, Presence>}
|
||||
* @type {Collection<Snowflake, Presence>}
|
||||
*/
|
||||
this.presences = new Collection();
|
||||
|
||||
@@ -191,7 +191,7 @@ class Client extends EventEmitter {
|
||||
|
||||
/**
|
||||
* The emojis that the client can use. Mapped by emoji ID.
|
||||
* @type {Collection<string, Emoji>}
|
||||
* @type {Collection<Snowflake, Emoji>}
|
||||
* @readonly
|
||||
*/
|
||||
get emojis() {
|
||||
@@ -257,7 +257,7 @@ class Client extends EventEmitter {
|
||||
* This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however
|
||||
* if you wish to force a sync of guild data, you can use this.
|
||||
* <warn>This is only available when using a user account.</warn>
|
||||
* @param {Guild[]|Collection<string, Guild>} [guilds=this.guilds] An array or collection of guilds to sync
|
||||
* @param {Guild[]|Collection<Snowflake, Guild>} [guilds=this.guilds] An array or collection of guilds to sync
|
||||
*/
|
||||
syncGuilds(guilds = this.guilds) {
|
||||
if (this.user.bot) return;
|
||||
|
||||
@@ -18,13 +18,13 @@ class ClientVoiceManager {
|
||||
|
||||
/**
|
||||
* A collection mapping connection IDs to the Connection objects
|
||||
* @type {Collection<string, VoiceConnection>}
|
||||
* @type {Collection<Snowflake, VoiceConnection>}
|
||||
*/
|
||||
this.connections = new Collection();
|
||||
|
||||
/**
|
||||
* Pending connection attempts, maps guild ID to VoiceChannel
|
||||
* @type {Collection<string, VoiceChannel>}
|
||||
* @type {Collection<Snowflake, VoiceChannel>}
|
||||
*/
|
||||
this.pending = new Collection();
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ class GuildMembersChunkHandler extends AbstractHandler {
|
||||
/**
|
||||
* Emitted whenever a chunk of guild members is received (all members come from the same guild)
|
||||
* @event Client#guildMembersChunk
|
||||
* @param {Collection<GuildMember>} members The members in the chunk
|
||||
* @param {Collection<Snowflake, GuildMember>} members The members in the chunk
|
||||
* @param {Guild} guild The guild related to the member chunk
|
||||
*/
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ class MessageDeleteBulkHandler extends AbstractHandler {
|
||||
/**
|
||||
* Emitted whenever messages are deleted in bulk
|
||||
* @event Client#messageDeleteBulk
|
||||
* @param {Collection<string, Message>} messages The deleted messages, mapped by their ID
|
||||
* @param {Collection<Snowflake, Message>} messages The deleted messages, mapped by their ID
|
||||
*/
|
||||
|
||||
module.exports = MessageDeleteBulkHandler;
|
||||
|
||||
Reference in New Issue
Block a user