Automatic Message When a Stream Starts in Discord with a Role Mention
What an Automatic Stream Announcement Consists Of
An automatic announcement consists of an event source, a delivery tool, and a Discord channel. The platform or service detects that a channel has gone live. A bot or automation script collects the link, title, and other stream data. Discord then receives a message in the channel and mentions the role of viewers who subscribed to notifications.
Discord itself does not track when a stream starts on any platform without an external integration. A ready-made bot works for a standard setup with a supported service. A webhook works when you need a custom template, additional conditions, or a platform that the bot doesn't support. The downside of a webhook is that it still needs an event source.
Create a Separate Role for Notifications
Don't use the moderator, partner, booster, or all-members role for pings. Create a separate role with a clear name, such as "Streams" or "Live Notifications." Only viewers who agree to announcements should get it. That way, an accidental stream start won't turn into a mass ping across the server.
In the role settings, you can choose a color and icon, but its identifier matters more for automation. Enable Discord developer mode, right-click the role, and copy the ID. You'll need it for the webhook and some services. Don't treat the ID as a secret: on its own, it doesn't grant access to the server.
Set Up Role Assignment for Viewers
On a small private server, you can assign the role manually. This option requires no additional setup but scales poorly: you'll have to respond to each new member individually. If the role is rarely removed, moderators also get extra requests to turn off notifications.
For a public server, a button, reaction, or interest-based role menu is more convenient. Members turn notifications on and off themselves. The downside of this approach is that it requires a bot or the built-in role system, and its permissions must be restricted. The assignment tool must not let a user obtain a moderator or service role.
Prepare a Private Channel for Announcements
Create a separate channel, such as "stream-announcements." Regular members are usually allowed to view history and react but are prohibited from sending messages. That way, the stream link won't get lost among discussions. For questions, clips, and chat, it's better to use an adjacent text channel or threads.
The bot or webhook needs permissions to view the channel, send messages, and embed links. If announcements will include thumbnails or files, it will need the attach files permission. Check permissions specifically in the announcements channel: they may differ from server-level permissions due to role or category overrides.
Choose a Bot for Notifications from the Streaming Platform
For Twitch, you can use Streamcord: the bot tracks the status of a selected channel and posts a notification in Discord. In the notification settings, you specify the destination channel, connect a Twitch account, and set the message template. The available fields, commands, and formatting depend on the current version of the bot and its plan.
When setting up the template, add the role mention in the format <@&123456789012345678>, where the number must be replaced with the notification role ID. This is not the text "@Streams" but an internal Discord mention. The downside of a ready-made bot is that you depend on the platforms it supports, its templates, limits, and available trigger conditions.
Check the Bot's Permission to Mention the Role
A message with the format <@&ROLE_ID> may arrive in the channel but fail to ping if the bot lacks permission to mention roles. In the bot's role permissions or the channel settings, check the permission to mention everyone, here, and all roles. Don't grant this permission to a wide range of regular members.
The "Allow anyone to @mention this role" toggle on the role itself makes it mentionable by regular users. Sometimes this is convenient but creates a risk of manual spam. If only the bot with the necessary permissions sends announcements, you usually don't need to open the role to all users. The downside of a stricter setup is that you'll have to recheck permissions when you change bots.
Set Up a Discord Webhook for Your Scenario
A webhook is created in the integrations settings of the desired Discord channel. After creation, Discord will show a URL to which an external service or your handler sends a POST request. The webhook URL equals publishing access: don't add it to screenshots, public repositories, documentation, or messages in a public chat.
A webhook doesn't monitor Twitch, YouTube, or another platform on its own. It only receives a ready-made request and publishes it to Discord. So the flow looks like this: the platform passes the event to an automation service or your handler, and that calls the webhook. The downside is that you'll need to set up the event, authorization, and handling of repeated requests.
Pass the Role via content and allowed_mentions
For a webhook, specifying the role only in the content field is not enough. You should separately restrict allowed mentions via allowed_mentions. This protects against accidental pings of @everyone, @here, or another role if someone else's text ends up in the stream title, description, or template.
Example JSON body for a Discord webhook with a single role mention:
{"content":"<@&123456789012345678> Stream started: ranking matches live\\nhttps://twitch.tv/your_channel","allowed_mentions":{"parse":[],"roles":["123456789012345678"]}}
In content, the role is specified as <@&ROLE_ID>, while in allowed_mentions you pass only the number without symbols. The value "parse":[] disables automatic parsing of all mention types. The roles array allows pinging only a specific role. The downside of manual JSON is that a single mistake in a quote, bracket, or ID will stop the send or disable the mention.
Assemble the Twitch, Service, and Discord Channel Chain
A working option without your own server: Twitch → Streamcord → "stream-announcements" channel. Connect the Twitch channel to Streamcord, select the destination channel, enable notifications only for an actual stream start, and add <@&ROLE_ID> to the template. Then grant the bot permission to post in that channel and mention the required role.
The webhook option looks like this: Twitch EventSub → automation service or your handler → Discord webhook → "stream-announcements" channel. The handler receives the stream start event, takes the current link, and sends JSON with content and allowed_mentions. The downside of EventSub and your own handler is that you need to maintain event subscriptions, tokens, and endpoint availability.
Set the Condition for an Actual Stream Start
Don't tie the announcement only to a scheduled time, event creation, or a change in the stream title. The streamer may be late, reschedule, run a technical test, or cancel the launch. The viewer will get a ping, follow the link, and see an offline page, which reduces trust in notifications.
The condition should be based on the "live" status or a dedicated stream start event. If the service passes multiple events, add a filter: publish the announcement only on the transition from offline to live. The downside of this check is that with unstable platform data, the notification sometimes arrives with a delay.
Protect the Channel from Repeated Announcements
A repeat occurs after a bot restart, a temporary API failure, a repeated webhook delivery, or a category change during a stream. For a ready-made bot, check whether there is a duplicate protection setting. If you use automation, store the current stream ID or a combination of the channel ID and the time of the first notification.
Don't set too short a time-based protection. If the stream dropped and was genuinely restarted, viewers may need a new announcement with a new link. Comparing the stream identifier is more reliable. The downside of this approach is that you'll need to understand which field the platform considers the unique stream ID.
Keep the Message Template Short and Useful
The announcement only needs the role, a clear signal that the stream has started, the topic, and the link. If the integration passes the game name, category, or thumbnail, you can add them, but don't copy the entire channel description and a set of hashtags. On mobile Discord, a long post fills the screen, and the stream link becomes less noticeable.
Basic format: <@&ROLE_ID> We're live — [topic]. Watch: [link to the current stream]. Take the link from the platform event or an integration variable rather than pasting it manually. The ping should lead to an active stream, not an old VOD, a schedule page, or another channel.
Verify That the Announcement Worked
- The test member has the notification role, and the second member does not.
- The bot or webhook can see the announcements channel and can send a message to it.
- The message uses the format <@&ROLE_ID>, and the ID matches the ID of the created role.
- For the webhook, allowed_mentions specifies a roles array with the same ID, and parse is left empty.
- The bot has permission to mention roles in the specific channel, not just in the server-wide permissions.
- A test run triggers one announcement, the role gets pinged, and a user without the role doesn't get a notification.
- The link from the message opens the current stream on desktop and in the mobile app.
Restrict Access to the Integration and Keys
Bot tokens, API keys, EventSub secrets, and webhook URLs allow reading data or sending messages on behalf of your channel. Store them in the service settings, environment variables, or a private secrets manager. If a webhook URL falls into the wrong hands, delete the webhook and create a new one.
Leave access to editing the automation to the server owner and a few people responsible for the technical side. Too broad access increases the risk of accidentally changing the role, channel, or send condition. Too strict a restriction also has a downside: if the one administrator is unavailable, no one will be able to fix a failure.
Last Articles
What has changed in design and functionality We have updated the website to make working with it faster and more convenient. The main changes affect ..
Good afternoon, I've collected all the news during this time.: 1. The main news is that prices for twitch viewers have been greatly reduced, while Tw..
1. Use promo code "December2025" for a 15% discount for all our viewers2. We have reduced the base prices for our configurator and the most affordable..
Twitch services are working stably, so we are ready to cooperate with squads, resellers, service owners, bot owners, and many others.Individual te..
We have completely updated our Twitch viewer services, and they are now working stably. We only use high-quality IP addresses for the viewers.The ..
Hello everyone! Today, we are announcing a new feature—"Twitch Viewer Configurator". Now, you can customize any plan for your Twitch channel. Choo..
Greetings, I have compiled a guide for streamers, which will be very relevant at the moment. Now YouTube and twitch have disabled monetization from vi..
We have finally developed the APINow it will be more convenient for our partner sites to work with us.To update the maximum tariffs for YouTube, an up..
Due to the huge popularity of the partnership services and referral program, we have made a cooperation table. The essence is very simple: more live a..
Our Services for Streamers
Our Services for Content Creators










