Important
🇹🇷 Türkçe versiyon için lütfen bu dosyaya bakınız.
A Discord bot that provides real-time earthquake alerts from the USGS feed. Users can subscribe to receive direct messages for earthquakes in specific regions and above a minimum magnitude, and server admins can configure alert channels for their communities.
- 🌍 Real-time earthquake alerts from USGS
- 📬 User subscriptions for region and magnitude-based DM alerts
- 🔔 Server channel alerts with region and magnitude filters
- 🗺️ Country-based region selection with autocomplete
- 🛡️ Admin-only configuration commands
- 📝 Easy setup with
.envand SQLite database
git clone https://github.com/yourusername/Earthquake-Alerts.git
cd Earthquake-AlertsMake sure you have Python 3.8+ installed.
pip install -r requirements.txtCopy .env.example to .env and add your Discord bot token:
cp .env.example .envEdit .env:
DISCORD_TOKEN=your_bot_token_herepython bot.py/setchannel— Set the alert channel, region, and minimum magnitude for this server./removechannel— Remove the alert channel configuration./status— Show current alert settings for this server.
/subscribe— Receive DMs for earthquakes in a selected region and above a minimum magnitude./unsubscribe— Stop receiving DM alerts./help— Show help and usage instructions.
/faketest— Send a fake earthquake alert (developer only)./sync— Force re-sync of slash commands (developer only).
- countries.json — Country bounding boxes for region filtering.
- countries.csv — Reference for country bounding boxes.
- botdata.db / config.db — SQLite databases for storing configuration and subscriptions.
See requirements.txt for the full list.
Key packages:
discord.pyrequestspython-dotenvpycountrysqlite3(standard library)- Railway for hosting (optional)
MIT License. See LICENSE for details.
Made with 💙 to help you get the fastest earthquake information. Stay safe!