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:
izexi
2019-05-03 16:38:57 +01:00
committed by SpaceEEC
parent 692494dc04
commit 176fc47699
2 changed files with 6 additions and 3 deletions

View File

@@ -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));
}