We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
你好:因为tg使用更加简单,请求添加一个tg的日志推送模块 如: tg_bot_token:telegram的bot token tg_user_id:telegram的用户id:
tg_bot_token
tg_user_id
sync请求示例:
import requests TG_USER_ID=tg_user_id TG_BOT_TOKEN=tg_bot_token TG_API_HOST = 'api.telegram.org' def telegram(log_detail:str): data = (('chat_id', TG_USER_ID), ('text', 'nb_log日志推送 \n\n' + log_detail:str)) response = requests.post('https://' + TG_API_HOST + '/bot' + TG_BOT_TOKEN + '/sendMessage', data=data) if response.status_code != 200: print('Telegram Bot 推送失败') else: print('Telegram Bot 推送成功')
The text was updated successfully, but these errors were encountered:
telegram国内能用吗?
Sorry, something went wrong.
可以搭建一个转发,再说也不一定都是国内用这个库啊
No branches or pull requests
你好:因为tg使用更加简单,请求添加一个tg的日志推送模块
如:
tg_bot_token
:telegram的bot tokentg_user_id
:telegram的用户id:sync请求示例:
The text was updated successfully, but these errors were encountered: