Documentation ¶
Overview ¶
Package telegram contains a Starlark module that exposes the Telegram Bot API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Module ¶
func Module(token string, client *http.Client) *starlarkstruct.Module
Module returns a Starlark module that exposes the Telegram Bot API.
This module provides a single function, call, which makes requests to the Telegram Bot API.
The call function takes two arguments:
- method (string): The Telegram Bot API method to call.
- args (dict): The arguments to pass to the method.
For example, to send a message to a chat:
result = telegram.call( method = "sendMessage", args = { "chat_id": 123456789, "text": "Hello, world!" } )
The result variable will contain the response from the Telegram Bot API.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.