A Telegram bot that shows your public IP address with detailed location information including country flags, city, ISP, and coordinates.
| Feature | Description |
|---|---|
| π IP Address Detection | Shows your current public IP |
| πΊπΈ Country with Flag | Country name with emoji flag (πΊπΈ, π·πΊ, πͺπΊ, etc.) |
| ποΈ Location Details | City, region, timezone information |
| π‘ Network Info | Internet Service Provider (ISP) details |
| πΊοΈ Map Integration | Show location on OpenStreetMap |
| π Real-time Updates | Refresh information anytime |
| π― User-friendly | Simple buttons and intuitive commands |
π Hello, User!
Your current IP: 123.45.67.89 πΊπΈ Country: United States ποΈ City: New York
Select an action: [π Refresh Info] [π Full Details] [π Show on Map]
π Your IP Information:
- π IP Address: 123.45.67.89
- πΊπΈ Country: United States
- ποΈ City: New York
- πΊοΈ Region: New York
- π Timezone: America/New_York
- π‘ ISP: Comcast Cable
- π Coordinates: 40.7128, -74.0060
- π Open in Google Maps
- Python 3.7 or higher
- Telegram account
- Bot token from @BotFather
# Clone the repository
git clone https://github.com/CraftStick/IPBot-telegram.git
cd IPBot-telegram
# Install dependencies
pip install -r requirements.txt
3. Configuration
bash
# Copy example config
cp config.example.py config.py
# Edit config.py and add your bot token
# Get your token from @BotFather on Telegram
4. Run the Bot
bash
python bot.py
π Usage
Commands
Command Description
/start Start the bot and show main menu
/info Get full IP information
/help Show help message
Buttons
Button Action
- π Refresh Info Update IP data
- π Full Details Extended information
- π Show on Map Open location on map
- π οΈ Technical Details
API Used
ip-api.com - Free IP geolocation service
Rate limit: 45 requests per minute
No API key required for basic usage
Dependencies
pyTelegramBotAPI - Telegram Bot API wrapper
requests - HTTP library for API calls
Installation via pip
bash
pip install pyTelegramBotAPI requests
π Project Structure
text
IPBot-telegram/
βββ bot.py # Main bot application
βββ requirements.txt # Python dependencies
βββ config.example.py # Example configuration
βββ README.md # Documentation
βββ .gitignore # Git ignore rules
π€ Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Fork the repository
Create your feature branch (git checkout -b feature/AmazingFeature)
Commit your changes (git commit -m 'Add some AmazingFeature')
Push to the branch (git push origin feature/AmazingFeature)
Open a Pull Request
π License
This project is licensed under the MIT License - see the LICENSE file for details.
β Support
If you find this project useful, please give it a star on GitHub!
π Contact & Links
GitHub: CraftStick
Repository: IPBot-telegram
Report Issues: GitHub Issues