mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 17:13:31 +01:00
backport: TextChannel#bulkDelete accepts Snowflake[]
This commit is contained in:
@@ -179,13 +179,12 @@ class RESTMethods {
|
||||
}
|
||||
|
||||
bulkDeleteMessages(channel, messages) {
|
||||
const ids = messages.map(m => m.id);
|
||||
return this.rest.makeRequest('post', Endpoints.Channel(channel).messages.bulkDelete, true, {
|
||||
messages: ids,
|
||||
messages: messages,
|
||||
}).then(() =>
|
||||
this.client.actions.MessageDeleteBulk.handle({
|
||||
channel_id: channel.id,
|
||||
ids,
|
||||
ids: messages,
|
||||
}).messages
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user