A Discord bot that recommends activities near a given location that are accessible by public transit. The bot leverages Mistral AI for natural language processing, OpenStreetMap APIs for location and transit data, and OpenWeatherMap for current weather conditions.
✅ Smart Activity Recommendations – Get suggestions for activities based on your location
🚆 Public Transit Accessibility – Ensures recommendations are reachable via transit
🌦 Weather-Aware – Adjusts recommendations based on current weather and season
🤖 Natural Language Understanding – Ask for suggestions in plain English
⌨ Command-Based Interaction – Use !activities
for structured queries
💰 100% Free & Open-Source – No need for Google Maps or paid APIs
coming soon ...
Ensure you have the following before installation:
- Python 3.8+
- Discord Bot Token (from Discord Developer Portal)
- Mistral AI API Key (from Mistral AI Platform)
- OpenRouteService API Key (free from OpenRouteService)
- OpenWeatherMap API Key (free tier from OpenWeatherMap)
-
Clone the repository:
git clone https://github.com/pzptz/terrabot.git cd terrabot
-
Install dependencies:
pip install -r requirements.txt
-
Setup API Keys:
- Create a .env file with your API keys:
- DISCORD_TOKEN
- MISTRAL_API_KEY
- OPENROUTE_API_KEY
- OPENWEATHER_API_KEY
- Run the bot:
python3 run.py
- Go to the Discord Developer Portal
- Create a new bot and enable "Message Content Intent" in the Bot section
- Use the OAuth2 URL generator and select the following scopes:
bot
applications.commands
Give the bot permissions:
- Read Messages/View Channels
- Send Messages
- Use External Emojis
- Add Reactions
Just ask the bot for activity recommendations in a natural conversational way:
"What can I do in Seattle?"
"Recommend activities near Chicago"
"What should I explore in Boston?"
!activities [location]
– Get activity recommendations for a specific location- Example:
!activities New York City
- Example:
!help_transit
– show detailed help information
Component | Purpose |
---|---|
Discord.py | Bot framework for Discord integration |
Mistral AI | Large language model for generating recommendations |
OpenStreetMap (OSM) | Location data & transit accessibility |
OpenRouteService | Public transit routing information |
OpenWeatherMap API | Real time weather data |
GeoPy | Geocoding & reverse geocoding library |
Nominatim API | Geocoding (location to coordinates) |
Overpass API | Finding points of interest |
- Completely Free – No billing setup or credit card required
- No API Quotas – The OpenStreetMap ecosystem doesn't require API keys for basic usage
- Global Coverage – Often better coverage in regions outside the US
- Community-Maintained Data – Frequently updated by local contributors
- Transit routing information may be limited in some regions
- API response times may be slower than commercial alternatives
- Weather data might not be available for all locations
This project is open-source and available under the MIT License.