Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| dd0d13d8f8 | |||
|
|
eea3f11f74 | ||
|
|
ab17126b76 |
@@ -1,5 +1,5 @@
|
||||
# Use oven/bun as parent image
|
||||
FROM oven/bun:1.0.27
|
||||
FROM oven/bun:1.2.23
|
||||
|
||||
# Change the working directory on the Docker image to /app
|
||||
WORKDIR /app
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "legica-dana",
|
||||
"version": "2.1.1",
|
||||
"version": "2.1.3",
|
||||
"main": "src/app.ts",
|
||||
"scripts": {
|
||||
"start": "bun run src/app.ts",
|
||||
|
||||
@@ -41,36 +41,39 @@ export async function sendDiscordMessage(
|
||||
)}`
|
||||
);
|
||||
}
|
||||
|
||||
const promises = client.channels.cache.map(async (channel) => {
|
||||
try {
|
||||
if (channel.type !== "text") return null;
|
||||
const embeddedMessage = new MessageEmbed().setTitle(title).setImage(img);
|
||||
const msg = await (channel as TextChannel).send(embeddedMessage);
|
||||
const reactions = [
|
||||
"1️⃣",
|
||||
"2️⃣",
|
||||
"3️⃣",
|
||||
"4️⃣",
|
||||
"5️⃣",
|
||||
"6️⃣",
|
||||
"7️⃣",
|
||||
"8️⃣",
|
||||
"9️⃣",
|
||||
"🔟",
|
||||
];
|
||||
for (const reaction of reactions) {
|
||||
try {
|
||||
await msg.react(reaction);
|
||||
} catch {
|
||||
console.error(`Reaction ${reaction} to channel ${channel.id} failed.`);
|
||||
try {
|
||||
const promises = client.channels.cache.map(async (channel) => {
|
||||
try {
|
||||
if (channel.type !== "text") return null;
|
||||
const embeddedMessage = new MessageEmbed().setTitle(title).setImage(img);
|
||||
const msg = await (channel as TextChannel).send(embeddedMessage);
|
||||
const reactions = [
|
||||
"1️⃣",
|
||||
"2️⃣",
|
||||
"3️⃣",
|
||||
"4️⃣",
|
||||
"5️⃣",
|
||||
"6️⃣",
|
||||
"7️⃣",
|
||||
"8️⃣",
|
||||
"9️⃣",
|
||||
"🔟",
|
||||
];
|
||||
for (const reaction of reactions) {
|
||||
try {
|
||||
await msg.react(reaction);
|
||||
} catch {
|
||||
console.error(`Reaction ${reaction} to channel ${channel.id} failed.`);
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
console.error(`Message to channel ${channel.id} failed.`);
|
||||
}
|
||||
} catch (err) {
|
||||
console.error(`Message to channel ${channel.id} failed.`);
|
||||
}
|
||||
});
|
||||
await Promise.all(promises);
|
||||
});
|
||||
await Promise.all(promises);
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user