I haven’t used webhooks in a while, but I think you can send multiple embeds in one HTTP request. You could group several messages (each as a separate embed) into one request.
Actually lemme test:
{
const url = 'https://canary.discordapp.com/api/webhooks/343362987622662144/z6r8217KiNVhWxf3SbnOaX8fQ4__TptWNvApVM3VqgybOXdQOE5-sgy00D4nMio7g89-';
function embed(title, desc, color, author) {
return {
timestamp: "2017-07-11T17:27:07.299000+00:00",
title,
desc,
color,
author: {
name: author,
icon_url: 'https://cdn.discordapp.com/emojis/339896242211389450.png'
},
fields: [
{
name: 'A',
value: 'B',
inline: true
},
{
name: 'A',
value: 'B',
inline: true
},
{
name: 'A',
value: 'B',
inline: true
},
{
name: 'A',
value: 'B',
inline: true
},
]
}
}
console.log(embed('a', 'b', 0xFFFFFF, 'einsteinK'));
$.post(url, JSON.stringify({
embeds: [
embed('Title1', 'Description1', 0xFF0000, 'einsteinK'),
embed('Title2', 'Description2', 0x00FF00, 'einsteinK'),
embed('Title3', 'Description3', 0x0000FF, 'einsteinK'),
]
}), console.log);
}
I already deleted the webhook to prevent spam. thanks to antonio6643#8700 for pointing that out