User

class bale.User(user_id, is_bot, first_name, last_name=None, username=None, bot=None)

Bases: object

This object represents a Bale user or bot.

user_id

Unique identifier for this user or bot.

Type:

int

is_bot

True, if this user is a bot.

Type:

bool

first_name

User’s or bot’s first name.

Type:

str

last_name

User’s or bot’s last name.

Type:

Optional[str]

username

User’s or bot’s username.

Type:

Optional[str]

property chat_id

Aliases for user_id

property mention

mention user with username.

Type:

Optional[str]

async send(text, components=None)

For the documentation of the arguments, please see bale.Bot.send_message().

async send_audio(audio, *, caption=None, components=None)

For the documentation of the arguments, please see bale.Bot.send_audio().

async send_contact(contact)

For the documentation of the arguments, please see bale.Bot.send_contact().

async send_document(document, *, caption=None, components=None)

For the documentation of the arguments, please see bale.Bot.send_document().

async send_invoice(title, description, provider_token, prices, *, payload=None, photo_url=None, need_name=False, need_phone_number=False, need_email=False, need_shipping_address=False, is_flexible=True)

For the documentation of the arguments, please see bale.Bot.send_invoice()

async send_location(location)

For the documentation of the arguments, please see bale.Bot.send_location().

async send_photo(photo, *, caption=None, components=None)

For the documentation of the arguments, please see bale.Bot.send_photo().

async send_video(video, *, caption=None, components=None)

For the documentation of the arguments, please see bale.Bot.send_video().