diff options
Diffstat (limited to 'DISCORD_TEST_README.md')
| -rw-r--r-- | DISCORD_TEST_README.md | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/DISCORD_TEST_README.md b/DISCORD_TEST_README.md new file mode 100644 index 0000000..e38fb70 --- /dev/null +++ b/DISCORD_TEST_README.md @@ -0,0 +1,57 @@ +# Discord Embed Test Script + +This script allows you to test the Discord embed functionality without running the full bot. + +## Setup + +1. **Configure your `.env` file** with Discord webhook settings: + + ```env + DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/your_webhook_url_here + DISCORD_LOG_CHANNEL_ID=1419186821509939300 + ``` + +2. **Install dependencies** (if not already installed): + ```bash + pip install -r requirements.txt + ``` + +## Usage + +Run the test script: + +```bash +python test_discord_embed.py +``` + +Or make it executable and run directly: + +```bash +chmod +x test_discord_embed.py +./test_discord_embed.py +``` + +## What it tests + +The script will send 4 test embeds to your Discord channel: + +1. **🟢 Reflair Action**: Tests the green embed for reflair actions +2. **🔴 Removal Action**: Tests the red embed for removal actions +3. **🔴 Long Reason Truncation**: Tests how long reasons are handled (truncated to 100 chars + "...") +4. **🔵 Custom Embed**: Tests a custom blue embed with various fields + +## Expected Output + +If successful, you should see: + +- ✅ Success messages in the terminal +- 4 embed messages in your Discord channel +- Color-coded embeds (green, red, blue) +- Proper formatting with emojis and fields +- Long reason truncation demonstration + +## Troubleshooting + +- **"DISCORD_WEBHOOK_URL not found"**: Make sure your `.env` file has the webhook URL +- **"Failed to send embed"**: Check that your webhook URL is valid and the bot has permission to send messages +- **Import errors**: Make sure you're running from the project root directory |