Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/mtkruto/tl/2_types.ts>SponsoredMessage_

Cross-runtime JavaScript library for building Telegram clients
Go to Latest
class SponsoredMessage_
import { SponsoredMessage_ } from "https://deno.land/x/mtkruto@0.1.190/tl/2_types.ts";

Constructors

new
SponsoredMessage_(params: { recommended?: true; show_peer_photo?: true; random_id: Uint8Array; from_id?: enums.Peer; chat_invite?: enums.ChatInvite; chat_invite_hash?: string; channel_post?: number; start_param?: string; webpage?: enums.SponsoredWebPage; app?: enums.BotApp; message: string; entities?: Array<enums.MessageEntity>; button_text?: string; sponsor_info?: string; additional_info?: string; })

Properties

protected
readonly
[id]: number
protected
readonly
[params]: Params
optional
additional_info: string

If set, contains additional information about the sponsored message to be shown along with the message.

optional
app: enums.BotApp

Mini App » to open when the sponsored message is clicked.

optional
button_text: string

Text of the sponsored message button.

optional
channel_post: number

Optional link to a channel post if from_id points to a channel

optional
chat_invite: enums.ChatInvite

Information about the chat invite hash specified in chat_invite_hash

optional
chat_invite_hash: string

Chat invite

optional
entities: Array<enums.MessageEntity>
optional
from_id: enums.Peer

ID of the sender of the message

message: string

Sponsored message

random_id: Uint8Array

Message ID

optional
show_peer_photo: true

Whether a profile photo bubble should be displayed for this message, like for messages sent in groups. The photo shown in the bubble is obtained either from the peer contained in from_id, or from chat_invite.

optional
sponsor_info: string

If set, contains additional information about the sponsor to be shown along with the message.

optional
start_param: string

Parameter for the bot start message if the sponsored chat is a chat with a bot.

optional
webpage: enums.SponsoredWebPage

Sponsored website

Static Properties

readonly
[name]: string
readonly
[paramDesc]: ParamDesc