Total Complexity | 3 |
Total Lines | 32 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | # -*- coding: utf-8 -*- |
||
2 | |||
3 | |||
4 | from data.config import ADMINS |
||
5 | from aiogram import Dispatcher |
||
6 | import logging |
||
7 | |||
8 | |||
9 | """ |
||
10 | |||
11 | |||
12 | Created on 10.09.2021 |
||
13 | |||
14 | @author: Nikita |
||
15 | |||
16 | |||
17 | """ |
||
18 | |||
19 | |||
20 | async def on_startup_notify(dp: Dispatcher): |
||
21 | |||
22 | for admin in ADMINS: |
||
23 | |||
24 | try: |
||
25 | data_bot = await dp.bot.get_me() |
||
26 | |||
27 | await dp.bot.send_message(admin, |
||
28 | f"{data_bot.first_name} успешно запущен!") |
||
29 | |||
30 | except Exception as err: |
||
31 | logging.exception(err) |
||
32 |