(AI generated by Copilot)
A discord StickyBot type bot which allows you to set up a sticky message to auto send after X amount of messages.
- Sticky Messages: Set a message that automatically reposts after a configurable number of messages
- Per-Channel Configuration: Each channel can have its own sticky message and message limit
- Persistent Storage: Configuration is saved and loaded automatically
- Slash Commands: Easy-to-use Discord slash commands
/stick <message>- Set a sticky message for the current channel (max 1 per channel)/unstick- Remove the sticky message from the current channel/msglimit <num>- Configure how many messages can be sent before the bot reposts the sticky message
- Python 3.8 or higher
- A Discord bot token (get one from Discord Developer Portal)
-
Clone this repository:
git clone https://github.com/PetarPetrushev/StickBot.git cd StickBot -
Install dependencies:
pip install -r requirements.txt
-
Create a
.envfile from the example:cp .env.example .env
-
Edit
.envand add your Discord bot token:DISCORD_BOT_TOKEN=your_actual_bot_token_here -
Run the bot:
python bot.py
Your bot needs the following permissions:
- Read Messages/View Channels
- Send Messages
- Manage Messages (to delete old sticky messages)
- Use Slash Commands
- Use
/stickto set a sticky message in a channel - The bot posts the message immediately
- After users send the configured number of messages (default: 10), the bot deletes the old sticky message and reposts it
- Use
/msglimitto change how many messages trigger a repost - Use
/unstickto remove the sticky message from a channel
All configuration is automatically saved to sticky_data.json and loaded when the bot restarts.