Ir para o conteúdo

botcity.plugins.telegram.plugin.BotTelegramPlugin

bot property readonly

Telegram bot instance.

Returns:

Type Description
bot

The telegram bot instance.

__init__(self, token) special

BotTelegramPlugin

Parameters:

Name Type Description Default
token str

Authentication bot token.

required

delete_message(self, response)

Deletes the message based on the response passed as argument.

Parameters:

Name Type Description Default
response Response

The response of sended message.

required

Returns:

Type Description
response

delete message response.

edit_message(self, text, response, username=None)

Update the message based on the response passed as argument.

Parameters:

Name Type Description Default
text str

The new text for message update.

required
response Response

The response of sended message.

required
username List[str]

The usernames for mentions.

None

Returns:

Type Description
response

edit message response.

send_message(self, text, group, username=None)

Sends a message.

Parameters:

Name Type Description Default
text str

The text of message.

required
group str

Public or private group to send message to.

required
username List[str]

The usernames for mentions.

None

Returns:

Type Description
response

send message response.

upload_document(self, document, group, caption)

Upload document to group telegram.

Parameters:

Name Type Description Default
document str

The document path.

required
group str

Public or private group to send message.

required
caption str

the document caption.

required

Returns:

Type Description
response

upload document response.