build.utils.set_bot_commands   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 8
dl 0
loc 25
rs 10
c 0
b 0
f 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A set_default_commands() 0 7 1
1
# -*- coding: utf-8 -*-
2
3
4
from aiogram import types
5
6
7
"""
8
9
10
    Created on 10.09.2021
11
    
12
    @author: Nikita
13
14
15
"""
16
17
18
async def set_default_commands(dp):
19
20
    await dp.bot.set_my_commands(
21
        [
22
            types.BotCommand("start", "Запустить бота"),
23
            types.BotCommand("help", "Вывести справку"),
24
            types.BotCommand("dice", "Подбросить кубик"),
25
        ]
26
    )
27