Merge pull request #31 from jusk9527/master

修复tgbot 发送失败问题
This commit is contained in:
yhy 2021-11-28 16:00:15 +08:00 committed by GitHub
commit 146d7e57d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -394,7 +394,7 @@ def server(text, msg,sckey):
def tgbot(text, msg,token,group_id):
import telegram
try:
bot = telegram.Bot(token='xxx'.format(token))# Your Telegram Bot Token
bot = telegram.Bot(token='{}'.format(token))# Your Telegram Bot Token
bot.send_message(chat_id=group_id, text='{}\r\n{}'.format(text, msg))
except Exception as e:
pass