slidgram.tg_msg¶
Attributes¶
Classes¶
Functions¶
|
|
|
Module Contents¶
- class slidgram.tg_msg.TelegramMessageSenderMixin(*a, **kw)[source]¶
Bases:
slidge.core.mixins.message.ContentMessageMixin
- session: slidgram.session.Session[source]¶
- send_file[source]¶
Send a single file from this XMPP Entity.
- Parameters:
file_path – Path to the attachment
async_data_stream – Alternatively (and ideally) an AsyncIterator yielding bytes
data_stream – Alternatively, a stream of bytes (such as a File object)
data – Alternatively, a bytes object
file_url – Alternatively, a URL
file_name – How the file should be named.
content_type – MIME type, inferred from filename if not given
legacy_msg_id – If you want to be able to transport read markers from the gateway user to the legacy network, specify this
reply_to – Quote another message (XEP-0461)
when – when the file was sent, for a “delay” tag (XEP-0203)
caption – an optional text that is linked to the file
legacy_file_id – A unique identifier for the file on the legacy network. Plugins should try their best to provide it, to avoid duplicates.
thread
- async send_tg_msg(message, carbon=False, correction=False, archive_only=False)[source]¶
- Parameters:
message (pyrogram.types.Message)
- Return type:
None
- async __send_text(message, carbon=False, correction=False, archive_only=False, text=None)[source]¶
- Parameters:
message (pyrogram.types.Message)
text (str | None)
- async _send_media(message, carbon, correction=False, archive_only=False)[source]¶
- Parameters:
message (pyrogram.types.Message)
carbon (bool)
- Return type:
None
- async __send_sticker(message, carbon, correction=False, archive_only=False)[source]¶
- Parameters:
message (pyrogram.types.Message)
carbon (bool)
- slidgram.tg_msg._get_link_previews(message)[source]¶
- Parameters:
message (pyrogram.types.Message)
- Return type:
list[slidge.util.types.LinkPreview] | None
- slidgram.tg_msg._get_media(message)[source]¶
- Parameters:
message (pyrogram.types.Message)
- Return type:
TgMediaTypes | None
- slidgram.tg_msg._MEDIAS = ('audio', 'document', 'photo', 'sticker', 'animation', 'video', 'voice', 'video_note', 'new_chat_photo')[source]¶
- slidgram.tg_msg._conversion_lock: asyncio.Lock | asyncio.Semaphore[source]¶