horfix #4 (fucking insanity)

This commit is contained in:
HornetMaidan 2024-10-05 01:38:52 +05:00
parent c0d02bb69a
commit 29cc8aedd4
2 changed files with 4 additions and 3 deletions

1
.env Normal file
View file

@ -0,0 +1 @@
YOUR_TOKEN_HERE

View file

@ -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():