Comments (7)
NODE_STATUS_URL = 'http://ss.tk:8081/json/stats.json'
offs = []
counterOff = {}
counterOn = {}
def _send(text):
chat_id = os.getenv('TG_CHAT_ID')
bot_token = os.environ.get('TG_BOT_TOKEN')
url = f"https://api.telegram.org/bot{101477704:AAHcZyavW1BZnEFvSvecmiiaqnpJHP9wKTI}/sendMessage?parse_mode=HTML&disable_web_page_preview=true&chat_id=39995195" + chat_id + "&text=" + text
from serverstatus.
怀疑你是把一些代码缩紧去掉了,对吗?
from serverstatus.
对呀!正确的填写应该是在上面吗?可以给一个示范吗?谢谢
from serverstatus.
NODE_STATUS_URL = 'http://sss.tk:8081/json/stats.json'
offs = []
counterOff = {}
counterOn = {}
def _send(text):
chat_id = os.getenv('TG_CHAT_ID34888195')
bot_token = os.environ.get('TG_BOT_TOKEN10000704:AAHcZyavW1BZnEFvSvecmiiaqnpJHP9wKTI')
url = f"https://api.telegram.org/bot{bot_token}/sendMessage?parse_mode=HTML&disable_web_page_preview=true&chat_id=" + chat_id + "&text=" + text
from serverstatus.
chat_id = '34888195'
bot_token = '10000704:AAHcZyavW1BZnEFvSvecmiiaqnpJHP9wKTI'
--
这样就可以了
from serverstatus.
好的,明白了谢谢
from serverstatus.
好的,明白了谢谢
from serverstatus.
Related Issues (20)
- 现在这个一键脚本用不了了吗? HOT 1
- 我的所有服务器都丢包百分之30,联通 HOT 1
- 怎么加入域名解析?
- vnstat HOT 1
- 小白一枚 HOT 1
- bot.py无法使用
- Oracle arm VPS 服務端 docker 容器一直 restarting - exec format error
- 容器一直重启 HOT 1
- 访问ip:8081,提示502页面
- _sss.py utf-8编码报错无法启动
- 请问web根目录被放在哪了
- 什么时候可以加入域名呢,用ip太麻烦了。 HOT 2
- 大佬能否加入vnstat流量统计和watchdog
- 文件“_sss.py”,第 249 行,位于 <module> 中 cmd() 文件“_sss.py”,第 213 行,在 cmd 中 print('- - - \u6b22\u8fce\u4f7f\u7528\u6700\u7b80\u6d01\u7684\u63a2\u9488: 服务器状态 - - -') UnicodeEncodeError:“latin-1”编解码器无法对位置 6-15 中的字符进行编码:序号不在范围内(256)
- 客户端安装后,服务器端还显示服务器关闭是怎么回事 HOT 1
- 请问如何调整tg推送关于主机下线的报警频率 HOT 3
- 虽然我没用,但是推送可以多加些
- 请问完成部署后如何修改bot token? HOT 1
- 执行sss.sh报错 HOT 1
- 只有ipv6的机器貌似监控不了 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from serverstatus.