With the data received from the Kandilli Observatory, you can call the latest earthquakes and earthquakes close to Konya Technical University, list them according to the magnitude or location of the earthquakes, and automatically send the most recent earthquake to the people and groups determined on the basis of location.
KTUN EARTHQUAKE BOT |
---|
Command | Explanation |
---|---|
/start |
Starts the bot |
/anlikdepremler |
Anlık gelişen depremler |
/sondepremler |
Recent earthquakes near campus |
/son3ile4 |
3 to 4 earthquakes near campus |
/son4ile5 |
4 to 5 earthquakes near campus |
/son5ile6 |
5 to 6 earthquakes near campus |
/son6uzeri |
6 or more earthquakes close to the campus |
/konumdeprem |
Earthquakes by location |
/iletisim |
Developer communication |
- Create bot and get API TOKEN via official Telegram bot @BotFather
- If you are going to run the bot on yourself:
- Send your own message to the bot @userinfobot and get your ID
- Go to the bot you created and launch it
- If you run the Bot on a group:
- Send a message with the group name to the bot @userinfobot and get the ID
- Add the bot to your group and give it admin
- Clone or download and unzip the repo
https://github.com/ahmethkablama/ktun-recent-earthquakes-bot
- You can use the following command for cloning
git clone https://github.com/ahmethkablama/ktun-recent-earthquakes-bot
- install
npm
from terminal
npm install
- Create
.env
file based on.env-example
file - Fill in the
YOUR_API_TOKEN
andYOUR_ID
sections in the.env
file according to you - install
npm
from terminal - Run it with the command
npm run start
ornode bot.js
- Download the repo
https://github.com/ahmethkablama/ktun-recent-earthquakes-bot
- Create an empty folder with your bot's name in your server's home directory
- Upload bot files to the folder you created
- Create
.env
file based on.env-example
file - Fill in the
YOUR_API_TOKEN
andYOUR_ID
sections in the.env
file according to your own - From your server panel (described as Cpanel) go to the
Setup Node.js App
tab - Go to the step of creating a new application by clicking the
CREATE APPLICATION
button - Select the appropriate Node.js version and mode. Type your bot's path and startup file (designated as
bot.js
) - Install NPM with
Run NPM Install
command and run your bot withRun JS script
command