components.types Module¶
This module contains the classes MessageType and UpdateType.
- class components.types.MessageType¶
Bases:
objectThis object represents message types relevant for the AkaNamen Bot.
- classmethod relevant_type(entity)¶
Extracts the type of the message, if it is relevant for the AkaNamen Bot in terms of
All_TYPES. If it’s not relevant, the output will beNone.Note
In contrast to
telegram.utils.helpers.effective_message_type(), only updates withupdate.messageare considered.- Parameters
entity (
Union[Update,Message]) – Atelegram.Updateortelegram.Message- Return type
- class components.types.UpdateType¶
Bases:
objectThis object represents update types relevant for the AkaNamen Bot.
- ALL_TYPES = ['message', 'inline_query', 'chosen_inline_result', 'callback_query', 'poll', 'poll_answer']¶
All relevant types
- Type
List[
str]
- classmethod relevant_type(update)¶
Extracts the type of the update, if it is relevant for the AkaNamen Bot in terms of
All_TYPES. If it’s not relevant, the output will beNone.- Parameters
update (
Update) – Atelegram.Update- Return type