Skip to content

Commit

Permalink
chore: message formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
N3aar committed Jun 10, 2024
1 parent 169f61f commit c860b48
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/events/announceScheduledEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ export default async function announceScheduledEvent() {

if (channelMessages.has(channel.id)) {
const messages = channelMessages.get(channel.id)?.message;
messages?.push(`- ${event.description}`);
messages?.push(event.description);
} else {
channelMessages.set(channel.id, {
channel,
message: [`- ${event.description}`],
message: [event.description],
});
}

Expand All @@ -51,6 +51,8 @@ export default async function announceScheduledEvent() {

for (const channelMessage of channelMessages.values()) {
const channel = channelMessage.channel;
channel.send(`# Eventos\n${channelMessage.message.join("\n")}`);
channel.send(
`# Eventos\n${channelMessage.message.map((m) => `- ${m}`).join("\n")}`,
);
}
}

0 comments on commit c860b48

Please sign in to comment.