mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
fix: Remove DM channels from Client#messageDeleteBulk's types (#8460)
This commit is contained in:
@@ -33,7 +33,7 @@ class MessageDeleteBulkAction extends Action {
|
||||
* Emitted whenever messages are deleted in bulk.
|
||||
* @event Client#messageDeleteBulk
|
||||
* @param {Collection<Snowflake, Message>} messages The deleted messages, mapped by their id
|
||||
* @param {TextBasedChannels} channel The channel that the messages were deleted in
|
||||
* @param {GuildTextBasedChannel} channel The channel that the messages were deleted in
|
||||
*/
|
||||
if (messages.size > 0) client.emit(Events.MessageBulkDelete, messages, channel);
|
||||
return { messages };
|
||||
|
||||
@@ -53,13 +53,19 @@ exports.NonSystemMessageTypes = [
|
||||
];
|
||||
|
||||
/**
|
||||
* The channels that are text-based.
|
||||
* * DMChannel
|
||||
* The guild channels that are text-based.
|
||||
* * TextChannel
|
||||
* * NewsChannel
|
||||
* * ThreadChannel
|
||||
* * VoiceChannel
|
||||
* @typedef {DMChannel|TextChannel|NewsChannel|ThreadChannel|VoiceChannel} TextBasedChannels
|
||||
* @typedef {TextChannel|NewsChannel|ThreadChannel|VoiceChannel} GuildTextBasedChannel
|
||||
*/
|
||||
|
||||
/**
|
||||
* The channels that are text-based.
|
||||
* * DMChannel
|
||||
* * GuildTextBasedChannel
|
||||
* @typedef {DMChannel|GuildTextBasedChannel} TextBasedChannels
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
2
packages/discord.js/typings/index.d.ts
vendored
2
packages/discord.js/typings/index.d.ts
vendored
@@ -4134,7 +4134,7 @@ export interface ClientEvents {
|
||||
reactions: Collection<string | Snowflake, MessageReaction>,
|
||||
];
|
||||
messageReactionRemoveEmoji: [reaction: MessageReaction | PartialMessageReaction];
|
||||
messageDeleteBulk: [messages: Collection<Snowflake, Message | PartialMessage>, channel: TextBasedChannel];
|
||||
messageDeleteBulk: [messages: Collection<Snowflake, Message | PartialMessage>, channel: GuildTextBasedChannel];
|
||||
messageReactionAdd: [reaction: MessageReaction | PartialMessageReaction, user: User | PartialUser];
|
||||
messageReactionRemove: [reaction: MessageReaction | PartialMessageReaction, user: User | PartialUser];
|
||||
messageUpdate: [oldMessage: Message | PartialMessage, newMessage: Message | PartialMessage];
|
||||
|
||||
Reference in New Issue
Block a user