feat: add Discord role mention support to routes

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

No files matched your search

+7
View File
@@ -89,6 +89,13 @@ function validateRoutes(
if (r.stop !== undefined && typeof r.stop !== "boolean") {
return { ok: false, error: `route "${r.id}".stop must be a boolean` };
}
if (
r.discordRoleIds !== undefined &&
(!Array.isArray(r.discordRoleIds) ||
!r.discordRoleIds.every((d) => typeof d === "string" && d.trim().length > 0))
) {
return { ok: false, error: `route "${r.id}".discordRoleIds must be a list of strings` };
}
if (!Array.isArray(r.filters)) {
return { ok: false, error: `route "${r.id}".filters must be an array` };
}