Earthquake Alert Bot
A Discord bot that sends earthquake alerts to servers based on user-configurable filters.
Table of Contents
Introduction
This bot uses the Discord API to send earthquake alerts to servers based on user-configurable filters. The bot uses data from a JSON feed to retrieve earthquake information and sends alerts to servers that have opted-in to receive them.
Features
- Send earthquake alerts to servers based on user-configurable filters
- Support for multiple filter types (e.g. magnitude, location)
- Automatic updates every 10 seconds
- Customizable alert messages and embeds
Setup
- Create a new Discord bot and obtain a token
- Install the required dependencies using
pip install -r requirements.txt - Create a new file named
config.pyand add your bot token and other configuration settings - Run the bot using
python main.py
Usage
- Invite the bot to your server
- Use the
!eqplaceand!eqmagcommands to set filters for your server - The bot will automatically send alerts to your server when an earthquake occurs that matches your filters
Commands
!eqplace <filter>: Set a filter for earthquake locations!eqmag <filter>: Set a filter for earthquake magnitudes!update: Update the bot's configuration and filters
Configuration
config.py: Contains the bot's configuration settings, including the token and filter settingsserver_config.db: A SQLite database that stores the bot's configuration and filter settings for each server
Troubleshooting
- If the bot is not sending alerts, check the console output for errors
- If the bot is sending duplicate alerts, check the
server_config.dbfile for duplicate entries - If you encounter any other issues, feel free to open an issue on this repository or contact the bot's author for support.
Note: This is just a sample README file, you should adjust it to fit your specific use case and needs.