mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 03:23:29 +01:00
feat(Actions): use partials for messageDeleteBulk (#3240)
* make use of partials * don't cache the messages * pass each message within the for..of iteration
This commit is contained in:
@@ -33,14 +33,14 @@ class GenericAction {
|
||||
this.client.channels.get(id));
|
||||
}
|
||||
|
||||
getMessage(data, channel) {
|
||||
getMessage(data, channel, cache = true) {
|
||||
const id = data.message_id || data.id;
|
||||
return data.message || (this.client.options.partials.includes(PartialTypes.MESSAGE) ?
|
||||
channel.messages.add({
|
||||
id,
|
||||
channel_id: channel.id,
|
||||
guild_id: data.guild_id || (channel.guild ? channel.guild.id : null),
|
||||
}) :
|
||||
}, cache) :
|
||||
channel.messages.get(id));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user