Modern Discord webhook TUI application built with Rust and Ratatui.
- 🎨 Modern Terminal User Interface (TUI)
- 📝 TOML-based template system
- 🚀 Easy to use
- ⚡ Async webhook sending
- 🎯 Form validation
- 📱 Responsive design
- 🌐 Multi-format URL support
cargo build --release# Run with Discord webhook URL (full URL)
./target/release/ptwebhook --token "https://discord.com/api/webhooks/YOUR_ID/YOUR_TOKEN"
# Run with ID/TOKEN only
./target/release/ptwebhook --token "YOUR_ID/YOUR_TOKEN"
# Short version
./target/release/ptwebhook -t "YOUR_ID/YOUR_TOKEN"https://discord.com/api/webhooks/ID/TOKENdiscord.com/api/webhooks/ID/TOKENID/TOKEN
↑/↓orj/k: Navigate between templatesEnterorSpace: Select templateqorEsc: Exit
↑/↓orTab/Shift+Tab: Navigate between fieldsType: Edit fieldBackspace: Delete characterEnter: Go to preview screenEsc: Return to template selectionq: Exit
EnterorSpace: Send message to DiscordEsc: Return to form filling screenq: Exit
Enter,SpaceorEsc: Return to template selectionq: Exit
Templates are stored in TOML format in the templates/ folder.
[template]
name = "Announcement"
description = "General announcement template"
[fields]
title = { type = "text", label = "Title", placeholder = "Important announcement title", required = true }
content = { type = "textarea", label = "Content", placeholder = "Write your announcement content here...", required = true }
priority = { type = "select", label = "Priority", options = ["Low", "Medium", "High"], default = "Medium" }
[webhook]
username = "Announcement Bot"
avatar_url = ""
color = 5814783 # Blue colortext: Single line texttextarea: Multi-line textselect: Option list
label: Field labelplaceholder: Placeholder textrequired: Required field (true/false)options: Options for select typedefault: Default value
Each template contains its own webhook settings:
username: Bot usernameavatar_url: Bot avatar URLcolor: Embed color (decimal)
# Run in development mode
cargo run -- --token "YOUR_ID/YOUR_TOKEN"
# Run tests
cargo test
# Format code
cargo fmt
# Linting
cargo clippyratatui: Terminal UI frameworkcrossterm: Cross-platform terminaltokio: Async runtimereqwest: HTTP clientserde: Serializationtoml: TOML parsingclap: CLI argument parsinganyhow: Error handlingurl: URL parsingregex: Regular expressions
The application provides detailed error messages for:
- Connection timeouts
- Invalid webhook URLs
- Network connectivity issues
- Discord API errors
- Template parsing errors
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the terms specified in the LICENSE file.