Genshin Gift Bot
A Telegram bot to help you find and redeem the latest Genshin Impact gift codes easily.
gi-bot-v1.2.0.mp4
Features
- 🔎 Scrape and aggregate Genshin Impact gift codes from multiple official sources (Hoyolab, Wiki, Official Website)
- ⚡ Fast response with in-memory caching (codes are only scraped once per hour)
- 📝 Logging to
bot.logfor debugging and monitoring - 🌙 Low CPU usage, optimized for PythonAnywhere and similar platforms
- 🆕 New: When you use
/start, if you have set your UID, the bot will display your UID and server in the welcome message
How to use
- Start the bot with
/start - Set your UID with
/setuid <your 9-digit UID>(e.g./setuid 858969293) - Use
/redeemto get the latest codes and redeem links (auto-filled with your UID/server if set) - Send a code or a photo of a code to the bot for instant redeem links
Deployment
- Python 3.8+
- Install dependencies:
pip install python-telegram-bot beautifulsoup4 requests aiohttp
- Run the bot:
python genshin_bot.py
Notes
- The bot caches codes for 1 hour to reduce scraping and save CPU
- Logging is optimized to avoid high disk and CPU usage
- All features are designed to be lightweight and efficient for cloud platforms
Enjoy your Genshin Impact rewards!
Full Changelog: v1.1.1...v1.2