mirror of
https://github.com/ReCloudStudio/WebHooker.git
synced 2026-09-22 16:11:29 +00:00
feat: add Discord role mention support to routes
This commit is contained in:
parent
869d84d78c
commit
76ba2c0a89
17 changed files with 201 additions and 14 deletions
|
|
@ -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 =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue