User¶
- class bale.User(id, is_bot, first_name, last_name=None, username=None)¶
Bases:
BaleObject
This object represents a Bale user or bot.
- async send(text, components=None, delete_after=None)¶
For the documentation of the arguments, please see
bale.Bot.send_message()
.await user.send("Hi, python-bale-bot!", components = None)
- async send_animation(animation, *, duration=None, width=None, height=None, caption=None, components=None, delete_after=None)¶
For the documentation of the arguments, please see
bale.Bot.send_animation()
.await user.send_animation(bale.InputFile("FILE_ID"), caption = "this is a caption", ...)
- async send_audio(audio, *, caption=None, components=None, delete_after=None)¶
For the documentation of the arguments, please see
bale.Bot.send_audio()
.await user.send_audio(bale.InputFile("FILE_ID"), caption = "this is a caption", ...)
- async send_contact(contact, *, components=None, delete_after=None)¶
For the documentation of the arguments, please see
bale.Bot.send_contact()
.await user.send_contact(bale.Contact('09****', 'first name', 'last name))
- async send_document(document, *, caption=None, components=None, delete_after=None)¶
For the documentation of the arguments, please see
bale.Bot.send_document()
.await user.send_document(bale.InputFile("FILE_ID"), caption = "this is a caption", ...)
- 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, delete_after=None)¶
For the documentation of the arguments, please see
bale.Bot.send_invoice()
.await user.send_invoice( "invoice title", "invoice description", "6037************", [bale.LabeledPrice("label", 2000)], payload = "unique invoice payload", ... )
- async send_location(location, *, components=None, delete_after=None)¶
For the documentation of the arguments, please see
bale.Bot.send_location()
.await user.send_location(bale.Location(35.71470468031143, 51.8568519168293))
- async send_photo(photo, *, caption=None, components=None, delete_after=None)¶
For the documentation of the arguments, please see
bale.Bot.send_photo()
.await user.send_photo(bale.InputFile("FILE_ID"), caption = "this is a caption", ...)
- async send_video(video, *, caption=None, components=None, delete_after=None)¶
For the documentation of the arguments, please see
bale.Bot.send_video()
.await user.send_video(bale.InputFile("FILE_ID"), caption = "this is a caption", ...)