diff --git a/cypress/config/settings.cypress.json b/cypress/config/settings.cypress.json
index 45e38a29e..ff763ac7e 100644
--- a/cypress/config/settings.cypress.json
+++ b/cypress/config/settings.cypress.json
@@ -75,6 +75,7 @@
"types": 0,
"options": {
"webhookUrl": "",
+ "webhookRoleId": "",
"enableMentions": true
}
},
diff --git a/docs/using-jellyseerr/notifications/discord.md b/docs/using-jellyseerr/notifications/discord.md
index 016de30e2..b39e283a8 100644
--- a/docs/using-jellyseerr/notifications/discord.md
+++ b/docs/using-jellyseerr/notifications/discord.md
@@ -18,6 +18,10 @@ Users can optionally opt-in to being mentioned in Discord notifications by confi
You can find the webhook URL in the Discord application, at **Server Settings → Integrations → Webhooks**.
+### Notification Role ID (optional)
+
+If a role ID is specified, it will be included in the webhook message. See [Discord role ID](https://support.discord.com/hc/en-us/articles/206346498-Where-can-I-find-my-User-Server-Message-ID).
+
### Bot Username (optional)
If you would like to override the name you configured for your bot in Discord, you may set this value to whatever you like!
diff --git a/overseerr-api.yml b/overseerr-api.yml
index 9e2505f48..dfbbfd084 100644
--- a/overseerr-api.yml
+++ b/overseerr-api.yml
@@ -1273,6 +1273,8 @@ components:
type: string
webhookUrl:
type: string
+ webhookRoleId:
+ type: string
enableMentions:
type: boolean
SlackSettings:
diff --git a/server/lib/notifications/agents/discord.ts b/server/lib/notifications/agents/discord.ts
index e949e3e18..8eb1d99d3 100644
--- a/server/lib/notifications/agents/discord.ts
+++ b/server/lib/notifications/agents/discord.ts
@@ -291,6 +291,10 @@ class DiscordAgent
}
}
+ if (settings.options.webhookRoleId) {
+ userMentions.push(`<@&${settings.options.webhookRoleId}>`);
+ }
+
const response = await fetch(settings.options.webhookUrl, {
method: 'POST',
headers: {
diff --git a/server/lib/settings/index.ts b/server/lib/settings/index.ts
index 29447f534..425fc1389 100644
--- a/server/lib/settings/index.ts
+++ b/server/lib/settings/index.ts
@@ -170,6 +170,7 @@ export interface NotificationAgentDiscord extends NotificationAgentConfig {
botUsername?: string;
botAvatarUrl?: string;
webhookUrl: string;
+ webhookRoleId?: string;
enableMentions: boolean;
};
}
@@ -394,6 +395,7 @@ class Settings {
types: 0,
options: {
webhookUrl: '',
+ webhookRoleId: '',
enableMentions: true,
},
},
diff --git a/src/components/Settings/Notifications/NotificationsDiscord.tsx b/src/components/Settings/Notifications/NotificationsDiscord.tsx
index b62263fbc..82ac68403 100644
--- a/src/components/Settings/Notifications/NotificationsDiscord.tsx
+++ b/src/components/Settings/Notifications/NotificationsDiscord.tsx
@@ -19,12 +19,16 @@ const messages = defineMessages('components.Settings.Notifications', {
webhookUrl: 'Webhook URL',
webhookUrlTip:
'Create a