Module botlegram

All of Botlegram’ functionality can be accessed by the module.

class botlegram.bot.Bot(token, webhook)

The class will execute setting webhook when initialization occurs.

Parameters:

  1. webhook (str): host webhook
  2. token (str): token of telegram bot

Inherits from:

  1. class Send
get_webhook_info()

For checking webhook setting.

Return: WebhookInfo object

set_webhook()

For webhook setting.

Return: True

Exception: WebhookError

console_log(log)

Print any message to logs immediately. e.g. Heroku logs.

Parameters:

  1. log (str)
msg_type(rq_content)

For checking message types.

Parameters:

  1. rq_content(json object)

Return: message type(str) or False