mirror of
https://github.com/PaiGramTeam/PaiGram.git
synced 2024-11-23 00:01:45 +00:00
修改配置文件Key拼写错误 删除多余配置
This commit is contained in:
parent
95a9a4dd34
commit
9c2db7fa94
@ -14,19 +14,15 @@
|
|||||||
"telegram": {
|
"telegram": {
|
||||||
"token": "",
|
"token": "",
|
||||||
"notice": {
|
"notice": {
|
||||||
"INFO": {
|
|
||||||
"name": "",
|
|
||||||
"char_id":
|
|
||||||
},
|
|
||||||
"ERROR": {
|
"ERROR": {
|
||||||
"name": "",
|
"name": "",
|
||||||
"char_id":
|
"chat_id":
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"channel": {
|
"channel": {
|
||||||
"POST": {
|
"POST": {
|
||||||
"name": "",
|
"name": "",
|
||||||
"char_id":
|
"chat_id":
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -11,14 +11,10 @@ from logger import Log
|
|||||||
from config import config
|
from config import config
|
||||||
|
|
||||||
try:
|
try:
|
||||||
notice_chat_id = config.TELEGRAM["notice"]["ERROR"]["char_id"]
|
notice_chat_id = config.TELEGRAM["notice"]["ERROR"]["chat_id"]
|
||||||
admin_list = []
|
|
||||||
for admin in config.ADMINISTRATORS:
|
|
||||||
admin_list.append(admin["user_id"])
|
|
||||||
except KeyError as error:
|
except KeyError as error:
|
||||||
Log.warning("错误通知Chat_id获取失败或未配置,BOT发生致命错误时不会收到通知 错误信息为\n", error)
|
Log.warning("错误通知Chat_id获取失败或未配置,BOT发生致命错误时不会收到通知 错误信息为\n", error)
|
||||||
notice_chat_id = None
|
notice_chat_id = None
|
||||||
admin_list = []
|
|
||||||
|
|
||||||
|
|
||||||
async def error_handler(update: object, context: CallbackContext) -> None:
|
async def error_handler(update: object, context: CallbackContext) -> None:
|
||||||
|
@ -100,7 +100,7 @@ class Post(BasePlugins):
|
|||||||
await message.reply_text("正在推送", reply_markup=ReplyKeyboardRemove())
|
await message.reply_text("正在推送", reply_markup=ReplyKeyboardRemove())
|
||||||
try:
|
try:
|
||||||
channel_name = config.TELEGRAM["channel"]["POST"]["name"]
|
channel_name = config.TELEGRAM["channel"]["POST"]["name"]
|
||||||
channel_id = config.TELEGRAM["channel"]["POST"]["char_id"]
|
channel_id = config.TELEGRAM["channel"]["POST"]["chat_id"]
|
||||||
except KeyError as error:
|
except KeyError as error:
|
||||||
Log.error("从配置文件获取频道信息发生错误,退出任务 \n", error)
|
Log.error("从配置文件获取频道信息发生错误,退出任务 \n", error)
|
||||||
await message.reply_text("从配置文件获取频道信息发生错误,退出任务", reply_markup=ReplyKeyboardRemove())
|
await message.reply_text("从配置文件获取频道信息发生错误,退出任务", reply_markup=ReplyKeyboardRemove())
|
||||||
|
Loading…
Reference in New Issue
Block a user