Изменён парсинг конфига
Добавлена обратная связь
This commit is contained in:
@@ -14,15 +14,15 @@ async def announce():
|
||||
docs_parse()
|
||||
except Exception:
|
||||
message = "Ошибка обновления данных!"
|
||||
if config.admin_user is not None:
|
||||
for user_id in config.admin_user:
|
||||
if user_id in config.exclude_send_msg:
|
||||
if config.admin_users.split(',') is not None:
|
||||
for user_id in config.admin_users.split(','):
|
||||
if user_id in config.exclude:
|
||||
continue
|
||||
await dp.bot.send_message(user_id, message)
|
||||
|
||||
|
||||
async def scheduler():
|
||||
schedule.every(int(config.anons('time'))).seconds.do(announce)
|
||||
schedule.every(int(config.time)).seconds.do(announce)
|
||||
|
||||
while True:
|
||||
await schedule.run_pending()
|
||||
|
Reference in New Issue
Block a user