2026-06-06 03:29:21 +07:00
|
|
|
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).
|
2026-06-06 03:29:21 +07:00
|
|
|
*/
|
|
|
|
|
export async function sendBoostGreeting(
|
2026-06-06 03:31:36 +07:00
|
|
|
channel: { send(input: { content: string }): Promise<unknown> },
|
|
|
|
|
userId: string,
|
2026-06-06 03:29:21 +07:00
|
|
|
greetingChannelId: string,
|
|
|
|
|
): Promise<void> {
|
2026-06-06 03:30:16 +07:00
|
|
|
const message =
|
2026-06-06 03:38:37 +07:00
|
|
|
`🎉 Makasih udah ngeboost <@${userId}>! ` +
|
|
|
|
|
`Sekarang kamu bisa claim custom role pake \`/booster-role claim\` di sini.`;
|
2026-06-06 03:30:16 +07:00
|
|
|
|
|
|
|
|
await channel.send({ content: message });
|
2026-06-06 03:29:21 +07:00
|
|
|
|
2026-06-06 03:31:36 +07:00
|
|
|
logger.info("Boost greeting sent", { userId, channelId: greetingChannelId });
|
2026-06-06 03:29:21 +07:00
|
|
|
}
|