- Text Triggers: : Detects specific messages and replies/reacts accordingly.
- Image Triggers: : Reacts to images posted in the channel.
- Custom Emojis: : Supports custom emojis in reactions.
Create or modify your config.json
file to set up channels and triggers. Here's an example:
{
"channels": {
"YOUR_CHANNEL_ID_HERE": [
{
"message": "^hello\\s+world$",
"regex": true,
"flags": "i",
"reactions": ["π", "π"],
"reply": "Hello to you too!"
},
{
"message": "bye",
"reactions": ["π"],
"reply": "Goodbye! Have a great day!"
},
{
"image": true,
"reactions": ["πΈ"]
},
{
"image": true,
"reactions": ["πΈ"],
"reply": "Nice photo!"
},
{
"message": "custom",
"reactions": ["<:customEmoji:123456789012345678>"],
"reply": "Custom emoji activated!"
}
]
}
}
- Channel ID: Replace
YOUR_CHANNEL_ID_HERE
with the actual channel ID where the bot should listen. - Regex Triggers: Set
"regex": true
(and optionally"flags": "i"
for case-insensitivity) to enable regex matching. - Custom Emojis:
- Use the format
<:emojiName:emojiID>
to specify custom emojis. - Note: The custom emoji must be available in the server where the bot is running.
- Use the format
The bot requires a Discord bot token, which is provided via the BOT_TOKEN
environment variable. This is configured directly in the Docker Compose file.
Run the following command in your project directory:
docker-compose up --build
This will build the container image (if necessary), install dependencies, and launch the bot.
-
Bot Not Reacting:
Ensure the channel ID in yourconfig.json
matches the channel where messages are being sent. -
Custom Emoji Issues:
Verify that the custom emoji is correctly formatted (<:emojiName:emojiID>
) and available in the server. -
Docker Errors:
Confirm that Docker and Docker Compose are installed and running correctly on your machine.