build.handlers.users.get_stiker   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 11
dl 0
loc 35
rs 10
c 0
b 0
f 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A bot_start() 0 16 1
1
# -*- coding: utf-8 -*-
2
3
4
from utils.misc.throttling import rate_limit
5
from aiogram import types
6
from loader import dp
7
8
9
"""
10
11
    Created on 10.09.2021
12
    
13
    @author: Nikita
14
15
16
"""
17
18
19
@rate_limit(5, 'sticker')
20
@dp.message_handler(content_types=types.ContentTypes.STICKER)
21
async def bot_start(message: types.Message):
22
23
    """
24
25
    The function is designed to process the sticker.
26
27
    """
28
29
    await types.ChatActions.typing()
30
31
    sticker_id = message.sticker.file_id
32
33
    await message.answer_sticker(
34
        sticker=sticker_id)
35