-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsitbot.py
25 lines (19 loc) · 862 Bytes
/
sitbot.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import telebot
import constants
import pinger
bot = telebot.TeleBot(constants.token)
@bot.message_handler(commands=['help'])
def handle_text(message):
bot.send_message(message.chat.id, "In order to know the status of servers, use the /PING command.")
bot.send_message(message.chat.id, "More bot itself every half hour pings the server and lets you know if one of them fell.")
@bot.message_handler(commands=['ping'])
def handle_text(message):
pinger.startp()
bot.send_message(message.chat.id, "pong")
bot.send_message(message.chat.id, "pong")
bot.send_message(message.chat.id, "pong")
bot.send_message(message.chat.id, pinger.text1)
bot.send_message(message.chat.id, pinger.text2)
bot.send_message(message.chat.id, pinger.text3)
bot.send_message(message.chat.id, pinger.text4)
bot.polling(none_stop=True, interval=0)