<<<<<<< HEAD # Discord-Message-Git-Tracker Tracks changes in a discord message as commits. ======= # Discord Git Bot This bot monitors message edits in Discord and commits the changes to a git repository. ## Setup 1. Create a Discord bot and get your bot token: - Go to the [Discord Developer Portal](https://discord.com/developers/applications) - Create a new application - Go to the "Bot" section and create a bot - Copy the bot token 2. Install dependencies: ```bash pip install -r requirements.txt ``` 3. Set up environment variables: ```bash export DISCORD_TOKEN='your_bot_token' export REPO_PATH='path_to_your_git_repository' ``` 4. Run the bot: ```bash python bot.py ``` ## Commands - `!track ` - Start tracking changes to a specific message - `!untrack ` - Stop tracking changes to a specific message - `!list-tracked` - Show all message IDs currently being tracked ## How it Works - When a tracked message is edited, the bot creates a new branch named `msg_edit_TIMESTAMP` - It updates a dedicated file for that message (`message_.txt`) with the current content - The changes are committed to the new branch with a timestamp - Previous versions of the message can be viewed through the git history - The bot switches back to the original branch after committing ## Features - Tracks specific messages by their ID - Creates a new branch for each edit to tracked messages - Stores both original and edited message content - Records message metadata (ID, channel, author) - Provides feedback in Discord when changes are committed - Simple commands to manage tracked messages >>>>>>> 30d646a (initial commit)