mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
* Move packages * Added changelog * Update examples/echo_bot.py Co-authored-by: Oleg A. <t0rr@mail.ru> * Rename `handler` -> `handlers` * Update __init__.py Co-authored-by: Oleg A. <t0rr@mail.ru>
19 lines
396 B
Python
19 lines
396 B
Python
from abc import ABC
|
|
from typing import List
|
|
|
|
from aiogram.handlers import BaseHandler
|
|
from aiogram.types import Poll, PollOption
|
|
|
|
|
|
class PollHandler(BaseHandler[Poll], ABC):
|
|
"""
|
|
Base class for poll handlers
|
|
"""
|
|
|
|
@property
|
|
def question(self) -> str:
|
|
return self.event.question
|
|
|
|
@property
|
|
def options(self) -> List[PollOption]:
|
|
return self.event.options
|