fix format error
This commit is contained in:
@@ -982,7 +982,8 @@ def saveFile(update, context):
|
|||||||
helpers.escape_markdown(" →→→ 抱歉,暂时只开放上传js文件至/scripts目录 ←←← ")),
|
helpers.escape_markdown(" →→→ 抱歉,暂时只开放上传js文件至/scripts目录 ←←← ")),
|
||||||
parse_mode=ParseMode.MARKDOWN_V2)
|
parse_mode=ParseMode.MARKDOWN_V2)
|
||||||
|
|
||||||
def unknown(update, context):
|
|
||||||
|
def unknown(update, context):
|
||||||
"""回复用户输入不存在的指令
|
"""回复用户输入不存在的指令
|
||||||
"""
|
"""
|
||||||
from_user_id = update.message.from_user.id
|
from_user_id = update.message.from_user.id
|
||||||
@@ -1014,13 +1015,15 @@ def saveFile(update, context):
|
|||||||
else:
|
else:
|
||||||
update.message.reply_text(text='此为私人使用bot,不能执行您的指令!')
|
update.message.reply_text(text='此为私人使用bot,不能执行您的指令!')
|
||||||
|
|
||||||
def error(update, context):
|
|
||||||
|
def error(update, context):
|
||||||
"""Log Errors caused by Updates."""
|
"""Log Errors caused by Updates."""
|
||||||
logger.warning('Update "%s" caused error "%s"', update, context.error)
|
logger.warning('Update "%s" caused error "%s"', update, context.error)
|
||||||
context.bot.send_message(
|
context.bot.send_message(
|
||||||
'Update "%s" caused error "%s"', update, context.error)
|
'Update "%s" caused error "%s"', update, context.error)
|
||||||
|
|
||||||
def main():
|
|
||||||
|
def main():
|
||||||
global admin_id, bot_token, crontab_list_file
|
global admin_id, bot_token, crontab_list_file
|
||||||
|
|
||||||
if 'TG_BOT_TOKEN' in os.environ:
|
if 'TG_BOT_TOKEN' in os.environ:
|
||||||
@@ -1098,13 +1101,14 @@ def saveFile(update, context):
|
|||||||
updater.start_polling()
|
updater.start_polling()
|
||||||
updater.idle()
|
updater.idle()
|
||||||
|
|
||||||
# 生成依赖安装列表
|
|
||||||
# pip3 freeze > requirements.txt
|
# 生成依赖安装列表
|
||||||
# 或者使用pipreqs
|
# pip3 freeze > requirements.txt
|
||||||
# pip3 install pipreqs
|
# 或者使用pipreqs
|
||||||
# 在当前目录生成
|
# pip3 install pipreqs
|
||||||
# pipreqs . --encoding=utf8 --force
|
# 在当前目录生成
|
||||||
# 使用requirements.txt安装依赖
|
# pipreqs . --encoding=utf8 --force
|
||||||
# pip3 install -r requirements.txt
|
# 使用requirements.txt安装依赖
|
||||||
if __name__ == '__main__':
|
# pip3 install -r requirements.txt
|
||||||
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
|||||||
Reference in New Issue
Block a user