mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-05 20:50:22 +03:00
Add HiddenKeyboard and ForcedReplyKeyboard custom types
This commit is contained in:
parent
12278cebb5
commit
9dd406c7a4
|
@ -55,4 +55,24 @@ class InlineKeyboard:
|
|||
self._raw = types.ReplyInlineMarkup(rows=_build_keyboard_rows(buttons))
|
||||
|
||||
|
||||
KeyboardType: TypeAlias = Keyboard | InlineKeyboard
|
||||
class HiddenKeyboard:
|
||||
__slots__ = ("_raw",)
|
||||
|
||||
def __init__(self, selective: bool) -> None:
|
||||
self._raw = types.ReplyKeyboardHide(selective=selective)
|
||||
|
||||
|
||||
class ForcedReplyKeyboard:
|
||||
__slots__ = ("_raw",)
|
||||
|
||||
def __init__(
|
||||
self, single_use: bool, selective: bool, placeholder: Optional[str]
|
||||
) -> None:
|
||||
self._raw = types.ReplyKeyboardForceReply(
|
||||
single_use=single_use, selective=selective, placeholder=placeholder
|
||||
)
|
||||
|
||||
|
||||
KeyboardType: TypeAlias = (
|
||||
Keyboard | InlineKeyboard | HiddenKeyboard | ForcedReplyKeyboard
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue
Block a user