build.app.on_startup()   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 5
rs 10
c 0
b 0
f 0
cc 1
nop 1
1
# -*- coding: utf-8 -*-
2
3
4
from aiogram import executor
5
6
from loader import dp
7
8
import middlewares
9
import filters
10
import handlers
11
from utils.notify_admins import on_startup_notify
12
from utils.set_bot_commands import set_default_commands
13
14
15
"""
16
17
18
    Created on 15.09.2021
19
20
    @author: Nikita
21
22
23
"""
24
25
26
async def on_startup(dispatcher):
27
28
    await set_default_commands(dispatcher)
29
30
    await on_startup_notify(dispatcher)
31
32
33
if __name__ == '__main__':
34
35
    executor.start_polling(dp, on_startup=on_startup, skip_updates=True)
36