Giter VIP home page Giter VIP logo

earthquake-alerts's Introduction

Earthquake Alerts Discord Bot

This is a Discord bot that provides earthquake alerts to its users. The bot is built using Node.js v16 and the Discord.js v13 library. It makes use of the USGS Earthquake API to get the latest earthquake data.

Features

The bot has the following features:

  • Set a channel where earthquake alerts will be sent
  • Set the interval for refreshing earthquake data (in minutes)
  • Set the interval for sending earthquake alerts (in minutes)
  • Add countries of interest for earthquake alerts
  • List all countries currently set for earthquake alerts
  • Set the minimum magnitude threshold for earthquake alerts
  • Get all earthquake alerts for today
  • Get all earthquake alerts for a specific country for today
  • Show command help

Installation & Configuration

  1. Clone the repository:

git clone https://github.com/adnanedrief/Earthquake-Alerts.git

  1. Install dependencies:

npm install nodemon axios [email protected]

  1. Replace the BOT_TOKEN in the config.json file with your Discord bot token.

  2. Start the bot:

nodemon app.js

Usage

To use the bot, you can use the following commands:

  • !alertchannel #channel - Set the channel where earthquake alerts will be sent.
  • !refresh - Set the interval for refreshing earthquake data (in minutes).
  • !alertinterval - Set the interval for sending earthquake alerts (in minutes).
  • !addcountry - Add a country of interest for earthquake alerts.
  • !listcountries - List all countries currently set for earthquake alerts.
  • !setmagnitude - Set the minimum magnitude threshold for earthquake alerts (default value is 4 ).
  • !todayalerts - Get all earthquake alerts for today.
  • !todayalertfor - Get all earthquake alerts for a specific country for today.
  • !help - Show command help.

Demo

demo.mp4

Adding the Bot to Your Server

To add this bot to your server, you can use the following link: Add Me To Your Server

Make sure to authorize the bot with the necessary permissions to read and send messages, as well as manage webhooks and embeds. With these permissions, the bot will be able to function properly in your server.

Contributing

Contributions are welcome! If you have any ideas, feel free to open an issue or a pull request.

earthquake-alerts's People

Contributors

adnanedrief avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

floofogus

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.