Linkbomber
Discord bot that cleans tracking elements from messages
You can invite the bot to your server here.
About
Many websites use tracking elements in the URL (e.g. https://example.com?utm_source=newsletter1&utm_medium=email&utm_campaign=sale) to mark your online activity. All those tracking codes are not necessary for a website to be displayed or work correctly and can therefore be removed—that is exactly what Linkbomber does.
Another common example are Amazon URLs. If you search for a product on Amazon you will see a very long URL, such as https://www.amazon.com/dp/exampleProduct/ref=sxin_0_pb?__mk_de_DE=ÅMÅŽÕÑ&keywords=tea&pd_rd_i=exampleProduct&pd_rd_r=8d39e4cd-1e4f-43db-b6e7-72e969a84aa5&pd_rd_w=1pcKM&pd_rd_wg=hYrNl&pf_rd_p=50bbfd25-5ef7-41a2-68d6-74d854b30e30&pf_rd_r=0GMWD0YYKA7XFGX55ADP&qid=1517757263&rnid=2914120011
Indeed most of the above URL are tracking codes. Once Linkbomber has cleaned the address, it will look like this:
https://www.amazon.com/dp/exampleProduct
Usage
By default, the bot will automatically strip tracking elements from any URL it supports,
this feature can be disabled with the command: /toggle. Then, to use the functionality
manually, just use the command /bomb which will strip the latest link posted in a channel
of its tracking elements.
Setup
- Clone the repository
- Build the program with
go build . - Run the program
./linkbomber -token <DISCORD_BOT_TOKEN>
