Aritzherrero4/AffiliateTelegramBot ? reverse-engineered prompt
Reverse engineered prompt
Build me a simple Python Telegram bot that turns Amazon links into affiliate links.
I want it to work both when people message it directly and when it’s added to a group. If someone sends a message with an Amazon URL, the bot should find the first valid product link in the message and reply with the same link converted to my affiliate version. It should handle common Amazon link formats, including shortened links too.
Please make it easy to configure with environment variables for the affiliate tag, the Amazon base site like amazon.es, and the Telegram bot token. If a developer chat ID is set, send a notice there when a link can’t be parsed or the product code isn’t found.
Keep it simple, with clear setup steps so I can run it locally with Python, and also deploy it in a basic always on setup like Heroku. If you need to check current docs for Telegram, go ahead and look them up.
Are you gonna build this?
make sure you review the code using arcumet