Mirrors Discord messages to a Slack channel. Designed to run on a schedule via Tower.
The app automatically prevents duplicate messages by checking the Tower API for the last successful run time and only posting messages that appeared after that time.
- Go to the Discord Developer Portal
- Create a new application or select an existing one
- Go to the "Bot" section and create a bot
- Copy the bot token
- Enable "Message Content Intent" in the Bot settings
- Invite the bot to your server with appropriate permissions (Read Messages, Read Message History)
- Enable Developer Mode in Discord (Settings -> Advanced -> Developer Mode)
- Right-click on each channel you want to mirror
- Click "Copy ID"
- You can mirror multiple channels by providing a comma-separated list of IDs
- Go to your Slack workspace settings
- Navigate to Apps -> Incoming Webhooks
- Create a new webhook for the target channel
- Copy the webhook URL
tower secrets create --name DISCORD_BOT_TOKEN --value <your-bot-token>Run every 5 minutes:
tower schedules create \
--app discord-mirror \
--cron "*/5 * * * *"Test the app manually before scheduling:
tower runThe app uses the following configuration:
Secrets (store with tower secrets create):
DISCORD_BOT_TOKEN- Discord bot authentication tokenSLACK_WEBHOOK_URL- Slack webhook URL to post messages to
Parameters (pass at runtime):
DISCORD_CHANNEL_IDS- Comma-separated list of Discord channel IDs to fetch messages from (e.g.,123456789,987654321)