feat: add Discord role mention support to routes

This commit is contained in:
RhenCloud 2026-08-11 15:48:44 +08:00
parent 869d84d78c
commit 76ba2c0a89
17 changed files with 201 additions and 14 deletions

View file

@ -55,6 +55,9 @@ export async function dispatchEvent(config: Config, event: WebhookEvent, env: En
const group = route.groupId ? groupById.get(route.groupId) : undefined;
const showEmoji = group?.emoji !== false;
const message = formatEvent(route, event, tr, showEmoji);
if (route.discordRoleIds?.length) {
message.mentionRoleIds = route.discordRoleIds;
}
for (const target of targets) {
const targetStr =