remove duplicates

This commit is contained in:
Mylloon 2022-07-27 01:51:22 +02:00
parent 65559753b7
commit af527042a6
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -80,7 +80,9 @@ export default async (message: Message, client: Client) => {
).filter(Boolean); ).filter(Boolean);
const loc = getLocale(client, client.config.default_lang); const loc = getLocale(client, client.config.default_lang);
messages.map(quoted_post => {
// Remove duplicates
[...new Set(messages)].map(quoted_post => {
const embed = new MessageEmbed() const embed = new MessageEmbed()
.setColor('#2f3136') .setColor('#2f3136')
.setAuthor({ .setAuthor({