legica -fixed reactions
This commit is contained in:
@@ -16,16 +16,14 @@ class ClientController {
|
|||||||
const href = await getFirstHtml();
|
const href = await getFirstHtml();
|
||||||
const { img, title } = await getImgTitle(href);
|
const { img, title } = await getImgTitle(href);
|
||||||
|
|
||||||
this.client.channels.cache.forEach((channel) => {
|
this.client.channels.cache.forEach(async (channel) => {
|
||||||
if (channel.type !== "text") return null;
|
if (channel.type !== "text") return null;
|
||||||
const embeddedMessage = new MessageEmbed().setTitle(title).setImage(img);
|
const embeddedMessage = new MessageEmbed().setTitle(title).setImage(img);
|
||||||
(channel as TextChannel).send(embeddedMessage).then((_message: Message) => {
|
const msg = await (channel as TextChannel).send(embeddedMessage);
|
||||||
_message.react("1");
|
const reactions = ["1️⃣", "2️⃣", "3️⃣", "4️⃣", "5️⃣", "6️⃣", "7️⃣", "8️⃣", "9️⃣", "🔟"];
|
||||||
_message.react("2");
|
for (const reaction of reactions) {
|
||||||
_message.react("3");
|
await msg.react(reaction);
|
||||||
_message.react("4");
|
}
|
||||||
_message.react("5");
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user