horfix #4 (fucking insanity)
This commit is contained in:
parent
c0d02bb69a
commit
29cc8aedd4
2 changed files with 4 additions and 3 deletions
1
.env
Normal file
1
.env
Normal file
|
|
@ -0,0 +1 @@
|
|||
YOUR_TOKEN_HERE
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
import subprocess
|
||||
import threading
|
||||
import telebot
|
||||
import os
|
||||
|
||||
#define the variables
|
||||
status, hostname, uptime, zerotier, prosody, postgres, tailscale, disk, ping = 'unknown', 'unknown', 'unknown', 'unknown', 'unknown', 'unknown', 'unknown', 'unknown', 'unknown'
|
||||
nodes, hostnames, reach, threads = [], [], [], []
|
||||
|
||||
TOKEN = os.getenv('TELEGRAM_BOT_TOKEN') #telegram bot token - set it in env: $TELEGRAM_BOT_TOKEN=your_token_here
|
||||
#load the token
|
||||
token = open('.env', 'r').read().strip()
|
||||
|
||||
#bot init
|
||||
bot = telebot.TeleBot(TOKEN)
|
||||
bot = telebot.TeleBot(token)
|
||||
|
||||
#get system info
|
||||
def getinfo():
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue