Skip to content

teddy-vltn/discord-auto-responder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Discord Auto-Responder & Reactor Bot

Features

  • 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.

Configuration

config.json

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.

Environment Variable

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.

Starting the Bot

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.

Troubleshooting

  • Bot Not Reacting:
    Ensure the channel ID in your config.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.

About

πŸš€ A Discord bot that automatically replies/reacts to messages and images in specific channels.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published