A simple Discord bot that cleans the "si=" query parameter from YouTube links.
- Introduced `main_test.go` with comprehensive test coverage. - Refactor `main.go` to enhance query parameter filtering using a cleaner data structure. - Update README with testing and usage instructions. - Add IntelliJ IDEA project configuration files to `.gitignore`. |
||
|---|---|---|
| .idea | ||
| .gitignore | ||
| go.mod | ||
| go.sum | ||
| main.go | ||
| main_test.go | ||
| README.md | ||
DiscordGo Link Cleaner
This bot cleans tracking parameters from YouTube and Instagram links (e.g., si=*, igsh=*), while preserving other query parameters.
Project Layout
main.go: Main bot logic and URL cleaning implementation.main_test.go: Unit tests for the URL cleaning logic.go.mod,go.sum: Go module configuration.
Build & Run
- Build:
go build - Run:
Use./yt-cleaner -t YOUR_DISCORD_BOT_TOKEN./yt-cleaner --helpfor flag details.
Testing
To run the test suite:
go test -v