Files
Booster-role/src/discord/events/boostGreeting.ts
T

20 lines
642 B
TypeScript
Raw Normal View History

import { logger } from "../../logger";
/**
2026-06-06 03:31:36 +07:00
* Sends a welcome message via the given channel when a member newly
* acquires the booster eligibility role (i.e. just boosted the server).
*/
export async function sendBoostGreeting(
2026-06-06 03:31:36 +07:00
channel: { send(input: { content: string }): Promise<unknown> },
userId: string,
greetingChannelId: string,
): Promise<void> {
const message =
`🎉 Makasih udah ngeboost <@${userId}>! ` +
`Sekarang kamu bisa claim custom role pake \`/booster-role claim\` di sini.`;
await channel.send({ content: message });
2026-06-06 03:31:36 +07:00
logger.info("Boost greeting sent", { userId, channelId: greetingChannelId });
}