-
Notifications
You must be signed in to change notification settings - Fork 0
Discord Integration
NewsFlash can forward messages from selected Discord channels to Minecraft.
The integration only reads Discord messages. It does not send messages or debug logs back to Discord.
- Open the Discord Developer Portal.
- Select New Application and create an application.
- Open the Bot page.
- Create or reset the bot token and copy it securely.
Never publish the token or commit it to a repository. Discord tokens are sensitive credentials.
On the application's Bot page, enable Message Content Intent under Privileged Gateway Intents.
NewsFlash needs this intent to read the text of incoming messages.
On the Installation or OAuth2 URL Generator page, create an install link with:
- Scope:
bot - Permissions:
View Channel,Add Reactions
Send Messages is not required because NewsFlash does not post back to Discord.
Open the generated link and add the bot to the target server. The bot must be able to view the channels that should be relayed.
For more information, see Discord's bot quick start guide.
- In Discord, open User Settings → Advanced.
- Enable Developer Mode.
- Right-click the target channel and select Copy Channel ID.
See Discord's guide for finding channel IDs.
Add the token and channel IDs to plugins/NewsFlash/config.yml:
discord:
enabled: true
token: "YOUR_BOT_TOKEN"
channel-ids:
- "123456789012345678"
max-message-length: 120
max-messages-per-minute: 5
ignore-bots: true
strip-mentions: true
strip-markdown: true
filter:
enabled: true
blocked-words:
- "fuck"
- "fucking"
- "fucked"
- "motherfucker"
reaction:
enabled: true
emoji: "✅"
filtered-emoji: "🚫"
rate-limited-emoji: "⏱️"
broadcast:
chat: false
actionbar: false
bossbar: trueRun the following command after saving the configuration:
/newsflash reload discord
When a message is accepted for relay, NewsFlash adds the configured reaction (✅ by default) to the original Discord message. Set discord.reaction.enabled to false to disable this behavior.
Messages rejected by the blocked-word filter receive 🚫, while messages rejected by the rate limit receive ⏱️. Messages from ignored bots, blank messages, and non-configured channels do not receive reactions.
Discord role colors are applied to author names in Minecraft using HEX colors. Embed titles, descriptions, and fields are also forwarded, with the Embed accent color applied when available.
Discord message text can use Minecraft legacy color codes and HEX tags:
&4hello friend !!&f from japan.
<#FFAA00>I am shakunage.</#FFAA00>
- Check
/newsflash statusto confirm that Discord is enabled. - Check the server console for
Discord relay connected. - Confirm that the bot can view the configured channel.
- Confirm that the bot has the
Add Reactionspermission. - Confirm that Message Content Intent is enabled.
- Confirm that the channel ID is correct.
- If the token was exposed, reset it immediately in the Discord Developer Portal and update
config.yml.