<<<<<<< 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
-
Create a Discord bot and get your bot token:
- Go to the Discord Developer Portal
- Create a new application
- Go to the "Bot" section and create a bot
- Copy the bot token
-
Install dependencies:
pip install -r requirements.txt -
Set up environment variables:
export DISCORD_TOKEN='your_bot_token' export REPO_PATH='path_to_your_git_repository' -
Run the bot:
python bot.py
Commands
!track <message_id>- Start tracking changes to a specific message!untrack <message_id>- 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_<ID>.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)
Description
Languages
Python
100%