NullTelegramBot
- class NullTelegramBot[source]
Bases:
object- __init__()
Methods
Attributes
- error: str = ''
- pending: dict[int, str] = {}
- alarm(message: str, repeat: bool = False, report: bool = False) None[source]
Sends an alarm message.
- Parameters:
message (str) – The alarm message.
repeat (bool, optional) – If True, the alarm is resent in telegram until acknowledged. Defaults to False.
report (bool, optional) – If True, this is a daily report, sent without the alarm emoji. Defaults to False.
- acknowledge(first_line: str, by: str) None[source]
Clears pending alarms matching a first line, leaving others intact.
- Parameters:
first_line (str) – The first line of the alarm message(s) to clear.
by (str) – Name to attribute the acknowledgment to.
- acknowledge_all(by: str) None[source]
Acknowledges every pending alarm, attributing it to by.
- Parameters:
by (str) – Name to attribute the acknowledgment to.
- register_custom(commands: list) None[source]
Registers custom commands collected from the project code directory.
- Parameters:
commands (list) – TelegramCommandBase instances.