ski.gagar.vxutil.vertigram.TgMethods.kt Maven / Gradle / Ivy
The newest version!
package ski.gagar.vxutil.vertigram
import java.time.Duration
import java.time.Instant
import kotlin.Boolean
import kotlin.Double
import kotlin.Int
import kotlin.Long
import kotlin.String
import kotlin.collections.List
import ski.gagar.vxutil.vertigram.client.Telegram
import ski.gagar.vxutil.vertigram.methods.AddStickerToSet
import ski.gagar.vxutil.vertigram.methods.AnswerCallbackQuery
import ski.gagar.vxutil.vertigram.methods.AnswerInlineQuery
import ski.gagar.vxutil.vertigram.methods.AnswerPreCheckoutQuery
import ski.gagar.vxutil.vertigram.methods.AnswerShippingQuery
import ski.gagar.vxutil.vertigram.methods.AnswerWebAppQuery
import ski.gagar.vxutil.vertigram.methods.ApproveChatJoinRequest
import ski.gagar.vxutil.vertigram.methods.BanChatMember
import ski.gagar.vxutil.vertigram.methods.BanChatSenderChat
import ski.gagar.vxutil.vertigram.methods.Close
import ski.gagar.vxutil.vertigram.methods.CloseForumTopic
import ski.gagar.vxutil.vertigram.methods.CloseGeneralForumTopic
import ski.gagar.vxutil.vertigram.methods.CopyMessage
import ski.gagar.vxutil.vertigram.methods.CopyMessages
import ski.gagar.vxutil.vertigram.methods.CreateChatInviteLink
import ski.gagar.vxutil.vertigram.methods.CreateForumTopic
import ski.gagar.vxutil.vertigram.methods.CreateInvoiceLink
import ski.gagar.vxutil.vertigram.methods.CreateNewStickerSet
import ski.gagar.vxutil.vertigram.methods.DeclineChatJoinRequest
import ski.gagar.vxutil.vertigram.methods.DeleteChatPhoto
import ski.gagar.vxutil.vertigram.methods.DeleteChatStickerSet
import ski.gagar.vxutil.vertigram.methods.DeleteForumTopic
import ski.gagar.vxutil.vertigram.methods.DeleteMessage
import ski.gagar.vxutil.vertigram.methods.DeleteMessages
import ski.gagar.vxutil.vertigram.methods.DeleteMyCommands
import ski.gagar.vxutil.vertigram.methods.DeleteStickerFromSet
import ski.gagar.vxutil.vertigram.methods.DeleteStickerSet
import ski.gagar.vxutil.vertigram.methods.DeleteWebhook
import ski.gagar.vxutil.vertigram.methods.EditChatInviteLink
import ski.gagar.vxutil.vertigram.methods.EditForumTopic
import ski.gagar.vxutil.vertigram.methods.EditGeneralForumTopic
import ski.gagar.vxutil.vertigram.methods.EditMessageCaption
import ski.gagar.vxutil.vertigram.methods.EditMessageLiveLocation
import ski.gagar.vxutil.vertigram.methods.EditMessageMedia
import ski.gagar.vxutil.vertigram.methods.EditMessageReplyMarkup
import ski.gagar.vxutil.vertigram.methods.EditMessageText
import ski.gagar.vxutil.vertigram.methods.ExportChatInviteLink
import ski.gagar.vxutil.vertigram.methods.ForwardMessage
import ski.gagar.vxutil.vertigram.methods.ForwardMessages
import ski.gagar.vxutil.vertigram.methods.GetChat
import ski.gagar.vxutil.vertigram.methods.GetChatAdministrators
import ski.gagar.vxutil.vertigram.methods.GetChatMember
import ski.gagar.vxutil.vertigram.methods.GetChatMemberCount
import ski.gagar.vxutil.vertigram.methods.GetChatMenuButton
import ski.gagar.vxutil.vertigram.methods.GetCustomEmojiStickers
import ski.gagar.vxutil.vertigram.methods.GetFile
import ski.gagar.vxutil.vertigram.methods.GetForumTopicIconStickers
import ski.gagar.vxutil.vertigram.methods.GetGameHighScores
import ski.gagar.vxutil.vertigram.methods.GetMe
import ski.gagar.vxutil.vertigram.methods.GetMyCommands
import ski.gagar.vxutil.vertigram.methods.GetMyDefaultAdministratorRights
import ski.gagar.vxutil.vertigram.methods.GetMyDescription
import ski.gagar.vxutil.vertigram.methods.GetMyName
import ski.gagar.vxutil.vertigram.methods.GetMyShortDescription
import ski.gagar.vxutil.vertigram.methods.GetStickerSet
import ski.gagar.vxutil.vertigram.methods.GetUserChatBoosts
import ski.gagar.vxutil.vertigram.methods.GetUserProfilePhotos
import ski.gagar.vxutil.vertigram.methods.GetWebHookInfo
import ski.gagar.vxutil.vertigram.methods.HideGeneralForumTopic
import ski.gagar.vxutil.vertigram.methods.LeaveChat
import ski.gagar.vxutil.vertigram.methods.LogOut
import ski.gagar.vxutil.vertigram.methods.PinChatMessage
import ski.gagar.vxutil.vertigram.methods.PromoteChatMember
import ski.gagar.vxutil.vertigram.methods.ReopenForumTopic
import ski.gagar.vxutil.vertigram.methods.ReopenGeneralForumTopic
import ski.gagar.vxutil.vertigram.methods.RestrictChatMember
import ski.gagar.vxutil.vertigram.methods.RevokeChatInviteLink
import ski.gagar.vxutil.vertigram.methods.SendAnimation
import ski.gagar.vxutil.vertigram.methods.SendAudio
import ski.gagar.vxutil.vertigram.methods.SendChatAction
import ski.gagar.vxutil.vertigram.methods.SendContact
import ski.gagar.vxutil.vertigram.methods.SendDice
import ski.gagar.vxutil.vertigram.methods.SendDocument
import ski.gagar.vxutil.vertigram.methods.SendGame
import ski.gagar.vxutil.vertigram.methods.SendInvoice
import ski.gagar.vxutil.vertigram.methods.SendLocation
import ski.gagar.vxutil.vertigram.methods.SendMediaGroup
import ski.gagar.vxutil.vertigram.methods.SendMessage
import ski.gagar.vxutil.vertigram.methods.SendPhoto
import ski.gagar.vxutil.vertigram.methods.SendPoll
import ski.gagar.vxutil.vertigram.methods.SendSticker
import ski.gagar.vxutil.vertigram.methods.SendVenue
import ski.gagar.vxutil.vertigram.methods.SendVideo
import ski.gagar.vxutil.vertigram.methods.SendVideoNote
import ski.gagar.vxutil.vertigram.methods.SendVoice
import ski.gagar.vxutil.vertigram.methods.SetChatAdministratorCustomTitle
import ski.gagar.vxutil.vertigram.methods.SetChatDescription
import ski.gagar.vxutil.vertigram.methods.SetChatMenuButton
import ski.gagar.vxutil.vertigram.methods.SetChatPermissions
import ski.gagar.vxutil.vertigram.methods.SetChatPhoto
import ski.gagar.vxutil.vertigram.methods.SetChatStickerSet
import ski.gagar.vxutil.vertigram.methods.SetChatTitle
import ski.gagar.vxutil.vertigram.methods.SetCustomEmojiStickerSetThumbnail
import ski.gagar.vxutil.vertigram.methods.SetGameScore
import ski.gagar.vxutil.vertigram.methods.SetMessageReaction
import ski.gagar.vxutil.vertigram.methods.SetMyCommands
import ski.gagar.vxutil.vertigram.methods.SetMyDefaultAdministratorRights
import ski.gagar.vxutil.vertigram.methods.SetMyDescription
import ski.gagar.vxutil.vertigram.methods.SetMyName
import ski.gagar.vxutil.vertigram.methods.SetMyShortDescription
import ski.gagar.vxutil.vertigram.methods.SetPassportDataErrors
import ski.gagar.vxutil.vertigram.methods.SetStickerEmojiList
import ski.gagar.vxutil.vertigram.methods.SetStickerKeywords
import ski.gagar.vxutil.vertigram.methods.SetStickerMaskPosition
import ski.gagar.vxutil.vertigram.methods.SetStickerPositionInSet
import ski.gagar.vxutil.vertigram.methods.SetStickerSetThumbnail
import ski.gagar.vxutil.vertigram.methods.SetStickerSetTitle
import ski.gagar.vxutil.vertigram.methods.SetWebhook
import ski.gagar.vxutil.vertigram.methods.StopMessageLiveLocation
import ski.gagar.vxutil.vertigram.methods.StopPoll
import ski.gagar.vxutil.vertigram.methods.UnbanChatMember
import ski.gagar.vxutil.vertigram.methods.UnbanChatSenderChat
import ski.gagar.vxutil.vertigram.methods.UnhideGeneralForumTopic
import ski.gagar.vxutil.vertigram.methods.UnpinAllChatMessages
import ski.gagar.vxutil.vertigram.methods.UnpinAllForumTopicMessages
import ski.gagar.vxutil.vertigram.methods.UnpinAllGeneralForumTopicMessages
import ski.gagar.vxutil.vertigram.methods.UnpinChatMessage
import ski.gagar.vxutil.vertigram.methods.UploadStickerFile
import ski.gagar.vxutil.vertigram.types.BotCommand
import ski.gagar.vxutil.vertigram.types.BotCommandScope
import ski.gagar.vxutil.vertigram.types.BotDescription
import ski.gagar.vxutil.vertigram.types.BotName
import ski.gagar.vxutil.vertigram.types.BotShortDescription
import ski.gagar.vxutil.vertigram.types.Chat
import ski.gagar.vxutil.vertigram.types.ChatAction
import ski.gagar.vxutil.vertigram.types.ChatAdministratorRights
import ski.gagar.vxutil.vertigram.types.ChatId
import ski.gagar.vxutil.vertigram.types.ChatInviteLink
import ski.gagar.vxutil.vertigram.types.ChatMember
import ski.gagar.vxutil.vertigram.types.ChatPermissions
import ski.gagar.vxutil.vertigram.types.DiceEmoji
import ski.gagar.vxutil.vertigram.types.File
import ski.gagar.vxutil.vertigram.types.ForumTopic
import ski.gagar.vxutil.vertigram.types.ForumTopicColor
import ski.gagar.vxutil.vertigram.types.GameHighScore
import ski.gagar.vxutil.vertigram.types.InlineKeyboardMarkup
import ski.gagar.vxutil.vertigram.types.InlineQueryResult
import ski.gagar.vxutil.vertigram.types.InlineQueryResultsButton
import ski.gagar.vxutil.vertigram.types.InputMedia
import ski.gagar.vxutil.vertigram.types.InputSticker
import ski.gagar.vxutil.vertigram.types.LabeledPrice
import ski.gagar.vxutil.vertigram.types.LinkPreviewOptions
import ski.gagar.vxutil.vertigram.types.MaskPosition
import ski.gagar.vxutil.vertigram.types.Me
import ski.gagar.vxutil.vertigram.types.MenuButton
import ski.gagar.vxutil.vertigram.types.Message
import ski.gagar.vxutil.vertigram.types.MessageEntity
import ski.gagar.vxutil.vertigram.types.ParseMode
import ski.gagar.vxutil.vertigram.types.PassportElementError
import ski.gagar.vxutil.vertigram.types.Poll
import ski.gagar.vxutil.vertigram.types.PollType
import ski.gagar.vxutil.vertigram.types.ReactionType
import ski.gagar.vxutil.vertigram.types.ReplyMarkup
import ski.gagar.vxutil.vertigram.types.ReplyParameters
import ski.gagar.vxutil.vertigram.types.SentWebAppMessage
import ski.gagar.vxutil.vertigram.types.ShippingOption
import ski.gagar.vxutil.vertigram.types.Sticker
import ski.gagar.vxutil.vertigram.types.StickerFormat
import ski.gagar.vxutil.vertigram.types.StickerSet
import ski.gagar.vxutil.vertigram.types.StickerType
import ski.gagar.vxutil.vertigram.types.UpdateType
import ski.gagar.vxutil.vertigram.types.UserChatBoosts
import ski.gagar.vxutil.vertigram.types.UserProfilePhotos
import ski.gagar.vxutil.vertigram.types.WebhookInfo
import ski.gagar.vxutil.vertigram.types.attachments.Attachment
/**
* Auto-generated from [AddStickerToSet]
*/
public suspend inline fun Telegram.addStickerToSet(
userId: Long,
name: String,
sticker: InputSticker,
): Boolean = call(AddStickerToSet(userId = userId, name = name, sticker = sticker))
/**
* Auto-generated from [AnswerCallbackQuery]
*/
public suspend inline fun Telegram.answerCallbackQuery(
callbackQueryId: String,
text: String? = null,
showAlert: Boolean? = null,
url: String? = null,
cacheTime: Duration? = null,
): Boolean = call(AnswerCallbackQuery(callbackQueryId = callbackQueryId, text = text, showAlert =
showAlert, url = url, cacheTime = cacheTime))
/**
* Auto-generated from [AnswerInlineQuery]
*/
public suspend inline fun Telegram.answerInlineQuery(
inlineQueryId: String,
results: List,
cacheTime: Duration? = null,
isPersonal: Boolean = false,
nextOffset: String? = null,
button: InlineQueryResultsButton? = null,
): Boolean = call(AnswerInlineQuery(inlineQueryId = inlineQueryId, results = results, cacheTime =
cacheTime, isPersonal = isPersonal, nextOffset = nextOffset, button = button))
/**
* Auto-generated from [AnswerPreCheckoutQuery]
*/
public suspend inline fun Telegram.answerPreCheckoutQuery(
preCheckoutQueryId: String,
ok: Boolean,
errorMessage: String? = null,
): Boolean = call(AnswerPreCheckoutQuery(preCheckoutQueryId = preCheckoutQueryId, ok = ok,
errorMessage = errorMessage))
/**
* Auto-generated from [AnswerShippingQuery]
*/
public suspend inline fun Telegram.answerShippingQuery(
shippingQueryId: String,
ok: Boolean,
shippingOptions: List? = null,
errorMessage: String? = null,
): Boolean = call(AnswerShippingQuery(shippingQueryId = shippingQueryId, ok = ok, shippingOptions =
shippingOptions, errorMessage = errorMessage))
/**
* Auto-generated from [AnswerWebAppQuery]
*/
public suspend inline fun Telegram.answerWebAppQuery(webAppQueryId: String,
result: List): SentWebAppMessage = call(AnswerWebAppQuery(webAppQueryId =
webAppQueryId, result = result))
/**
* Auto-generated from [ApproveChatJoinRequest]
*/
public suspend inline fun Telegram.approveChatJoinRequest(chatId: ChatId, userId: Long): Boolean =
call(ApproveChatJoinRequest(chatId = chatId, userId = userId))
/**
* Auto-generated from [BanChatMember]
*/
public suspend inline fun Telegram.banChatMember(
chatId: ChatId,
userId: Long,
untilDate: Instant? = null,
revokeMessages: Boolean = false,
): Boolean = call(BanChatMember(chatId = chatId, userId = userId, untilDate = untilDate,
revokeMessages = revokeMessages))
/**
* Auto-generated from [BanChatSenderChat]
*/
public suspend inline fun Telegram.banChatSenderChat(chatId: ChatId, senderChatId: Long): Boolean =
call(BanChatSenderChat(chatId = chatId, senderChatId = senderChatId))
/**
* Auto-generated from [Close]
*/
public suspend inline fun Telegram.closeApi(): Boolean = call(Close)
/**
* Auto-generated from [CloseForumTopic]
*/
public suspend inline fun Telegram.closeForumTopic(chatId: ChatId, messageThreadId: Long): Boolean =
call(CloseForumTopic(chatId = chatId, messageThreadId = messageThreadId))
/**
* Auto-generated from [CloseGeneralForumTopic]
*/
public suspend inline fun Telegram.closeGeneralForumTopic(chatId: ChatId): Boolean =
call(CloseGeneralForumTopic(chatId = chatId))
/**
* Auto-generated from [CopyMessage]
*/
public suspend inline fun Telegram.copyMessage(
chatId: ChatId,
fromChatId: ChatId,
messageId: Long,
caption: String? = null,
parseMode: ParseMode? = null,
captionEntities: List? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
replyMarkup: ReplyMarkup? = null,
messageThreadId: Long? = null,
replyParameters: ReplyParameters? = null,
): Message = call(CopyMessage(chatId = chatId, fromChatId = fromChatId, messageId = messageId,
caption = caption, parseMode = parseMode, captionEntities = captionEntities, disableNotification
= disableNotification, protectContent = protectContent, replyMarkup = replyMarkup,
messageThreadId = messageThreadId, replyParameters = replyParameters))
/**
* Auto-generated from [CopyMessages]
*/
public suspend inline fun Telegram.copyMessages(
chatId: ChatId,
fromChatId: ChatId,
messageIds: List,
messageThreadId: Long? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
removeCaption: Boolean = false,
): Message = call(CopyMessages(chatId = chatId, fromChatId = fromChatId, messageIds = messageIds,
messageThreadId = messageThreadId, disableNotification = disableNotification, protectContent =
protectContent, removeCaption = removeCaption))
/**
* Auto-generated from [CreateChatInviteLink]
*/
public suspend inline fun Telegram.createChatInviteLink(
chatId: ChatId,
name: String? = null,
expireDate: Instant? = null,
memberLimit: Int? = null,
createsJoinRequest: Boolean = false,
): ChatInviteLink = call(CreateChatInviteLink(chatId = chatId, name = name, expireDate = expireDate,
memberLimit = memberLimit, createsJoinRequest = createsJoinRequest))
/**
* Auto-generated from [CreateForumTopic]
*/
public suspend inline fun Telegram.createForumTopic(
chatId: ChatId,
name: String,
iconColor: ForumTopicColor? = null,
iconCustomEmojiId: String? = null,
): ForumTopic = call(CreateForumTopic(chatId = chatId, name = name, iconColor = iconColor,
iconCustomEmojiId = iconCustomEmojiId))
/**
* Auto-generated from [CreateInvoiceLink]
*/
public suspend inline fun Telegram.createInvoiceLink(
title: String,
description: String,
payload: String,
providerToken: String,
currency: String,
prices: List,
maxTipAmount: Int? = null,
suggestedTipAmounts: List? = null,
providerData: String? = null,
photoUrl: String? = null,
photoSize: Long? = null,
photoWidth: Int? = null,
photoHeight: Int? = null,
needName: Boolean = false,
needPhoneNumber: Boolean = false,
needEmail: Boolean = false,
needShippingAddress: Boolean = false,
sendPhoneNumberToProvider: Boolean = false,
sendEmailToProvider: Boolean = false,
isFlexible: Boolean,
): Message = call(CreateInvoiceLink(title = title, description = description, payload = payload,
providerToken = providerToken, currency = currency, prices = prices, maxTipAmount =
maxTipAmount, suggestedTipAmounts = suggestedTipAmounts, providerData = providerData, photoUrl =
photoUrl, photoSize = photoSize, photoWidth = photoWidth, photoHeight = photoHeight, needName =
needName, needPhoneNumber = needPhoneNumber, needEmail = needEmail, needShippingAddress =
needShippingAddress, sendPhoneNumberToProvider = sendPhoneNumberToProvider, sendEmailToProvider
= sendEmailToProvider, isFlexible = isFlexible))
/**
* Auto-generated from [CreateNewStickerSet]
*/
public suspend inline fun Telegram.createNewStickerSet(
userId: Long,
name: String,
title: String,
stickers: List,
stickerFormat: StickerFormat,
stickerType: StickerType = CreateNewStickerSet.Defaults.stickerType,
needsRepainting: Boolean = false,
): Boolean = call(CreateNewStickerSet(userId = userId, name = name, title = title, stickers =
stickers, stickerFormat = stickerFormat, stickerType = stickerType, needsRepainting =
needsRepainting))
/**
* Auto-generated from [DeclineChatJoinRequest]
*/
public suspend inline fun Telegram.declineChatJoinRequest(chatId: ChatId, userId: Long): Boolean =
call(DeclineChatJoinRequest(chatId = chatId, userId = userId))
/**
* Auto-generated from [DeleteChatPhoto]
*/
public suspend inline fun Telegram.deleteChatPhoto(chatId: ChatId): Boolean =
call(DeleteChatPhoto(chatId = chatId))
/**
* Auto-generated from [DeleteChatStickerSet]
*/
public suspend inline fun Telegram.deleteChatStickerSet(chatId: ChatId): Boolean =
call(DeleteChatStickerSet(chatId = chatId))
/**
* Auto-generated from [DeleteForumTopic]
*/
public suspend inline fun Telegram.deleteForumTopic(chatId: ChatId, messageThreadId: Long): Boolean
= call(DeleteForumTopic(chatId = chatId, messageThreadId = messageThreadId))
/**
* Auto-generated from [DeleteMessage]
*/
public suspend inline fun Telegram.deleteMessage(chatId: ChatId, messageId: Long): Boolean =
call(DeleteMessage(chatId = chatId, messageId = messageId))
/**
* Auto-generated from [DeleteMessages]
*/
public suspend inline fun Telegram.deleteMessages(chatId: ChatId, messageIds: List): Boolean =
call(DeleteMessages(chatId = chatId, messageIds = messageIds))
/**
* Auto-generated from [DeleteMyCommands]
*/
public suspend inline fun Telegram.deleteMyCommands(scope: BotCommandScope, languageCode: String? =
null): Boolean = call(DeleteMyCommands(scope = scope, languageCode = languageCode))
/**
* Auto-generated from [DeleteStickerFromSet]
*/
public suspend inline fun Telegram.deleteStickerFromSet(sticker: String): Boolean =
call(DeleteStickerFromSet(sticker = sticker))
/**
* Auto-generated from [DeleteStickerSet]
*/
public suspend inline fun Telegram.deleteStickerSet(name: String): Message =
call(DeleteStickerSet(name = name))
/**
* Auto-generated from [DeleteWebhook]
*/
public suspend inline fun Telegram.deleteWebhook(): Boolean = call(DeleteWebhook)
/**
* Auto-generated from [EditChatInviteLink]
*/
public suspend inline fun Telegram.editChatInviteLink(
chatId: ChatId,
inviteLink: String,
name: String? = null,
expireDate: Instant? = null,
memberLimit: Int? = null,
createsJoinRequest: Boolean = false,
): ChatInviteLink = call(EditChatInviteLink(chatId = chatId, inviteLink = inviteLink, name = name,
expireDate = expireDate, memberLimit = memberLimit, createsJoinRequest = createsJoinRequest))
/**
* Auto-generated from [EditForumTopic]
*/
public suspend inline fun Telegram.editForumTopic(
chatId: ChatId,
messageThreadId: Long,
name: String? = null,
iconCustomEmojiId: String? = null,
): Boolean = call(EditForumTopic(chatId = chatId, messageThreadId = messageThreadId, name = name,
iconCustomEmojiId = iconCustomEmojiId))
/**
* Auto-generated from [EditGeneralForumTopic]
*/
public suspend inline fun Telegram.editGeneralForumTopic(chatId: ChatId, name: String? = null):
Boolean = call(EditGeneralForumTopic(chatId = chatId, name = name))
/**
* Auto-generated from [EditMessageCaption]
*/
public suspend inline fun Telegram.editMessageCaption(
chatId: ChatId? = null,
messageId: Long? = null,
inlineMessageId: Long? = null,
caption: String? = null,
parseMode: ParseMode? = null,
captionEntities: List? = null,
replyMarkup: ReplyMarkup? = null,
): Message = call(EditMessageCaption(chatId = chatId, messageId = messageId, inlineMessageId =
inlineMessageId, caption = caption, parseMode = parseMode, captionEntities = captionEntities,
replyMarkup = replyMarkup))
/**
* Auto-generated from [EditMessageLiveLocation]
*/
public suspend inline fun Telegram.editMessageLiveLocation(
latitude: Double,
longitude: Double,
chatId: ChatId? = null,
messageId: Long? = null,
inlineMessageId: String? = null,
horizontalAccuracy: Double? = null,
heading: Int? = null,
proximityAlertRadius: Int? = null,
replyMarkup: ReplyMarkup? = null,
): Message = call(EditMessageLiveLocation(latitude = latitude, longitude = longitude, chatId =
chatId, messageId = messageId, inlineMessageId = inlineMessageId, horizontalAccuracy =
horizontalAccuracy, heading = heading, proximityAlertRadius = proximityAlertRadius, replyMarkup
= replyMarkup))
/**
* Auto-generated from [EditMessageMedia]
*/
public suspend inline fun Telegram.editMessageMedia(
media: InputMedia,
chatId: ChatId? = null,
messageId: Long? = null,
inlineMessageId: Long? = null,
replyMarkup: InlineKeyboardMarkup? = null,
): Message = call(EditMessageMedia(media = media, chatId = chatId, messageId = messageId,
inlineMessageId = inlineMessageId, replyMarkup = replyMarkup))
/**
* Auto-generated from [EditMessageReplyMarkup]
*/
public suspend inline fun Telegram.editMessageReplyMarkup(
chatId: ChatId? = null,
messageId: Long? = null,
inlineMessageId: String? = null,
replyMarkup: InlineKeyboardMarkup? = null,
): Message = call(EditMessageReplyMarkup(chatId = chatId, messageId = messageId, inlineMessageId =
inlineMessageId, replyMarkup = replyMarkup))
/**
* Auto-generated from [EditMessageText]
*/
public suspend inline fun Telegram.editMessageText(
text: String,
chatId: ChatId? = null,
messageId: Long? = null,
inlineMessageid: Long? = null,
parseMode: ParseMode? = null,
entities: List? = null,
replyMarkup: ReplyMarkup? = null,
linkPreviewOptions: LinkPreviewOptions? = null,
): Message = call(EditMessageText(text = text, chatId = chatId, messageId = messageId,
inlineMessageid = inlineMessageid, parseMode = parseMode, entities = entities, replyMarkup =
replyMarkup, linkPreviewOptions = linkPreviewOptions))
/**
* Auto-generated from [ExportChatInviteLink]
*/
public suspend inline fun Telegram.exportChatInviteLink(chatId: ChatId): String =
call(ExportChatInviteLink(chatId = chatId))
/**
* Auto-generated from [ForwardMessage]
*/
public suspend inline fun Telegram.forwardMessage(
chatId: ChatId,
fromChatId: ChatId,
messageId: Long,
disableNotification: Boolean = false,
protectContent: Boolean = false,
messageThreadId: Long? = null,
): Message = call(ForwardMessage(chatId = chatId, fromChatId = fromChatId, messageId = messageId,
disableNotification = disableNotification, protectContent = protectContent, messageThreadId =
messageThreadId))
/**
* Auto-generated from [ForwardMessages]
*/
public suspend inline fun Telegram.forwardMessages(
chatId: ChatId,
fromChatId: ChatId,
messageIds: List,
messageThreadId: Long? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
): Message = call(ForwardMessages(chatId = chatId, fromChatId = fromChatId, messageIds = messageIds,
messageThreadId = messageThreadId, disableNotification = disableNotification, protectContent =
protectContent))
/**
* Auto-generated from [GetChat]
*/
public suspend inline fun Telegram.getChat(chatId: ChatId): Chat = call(GetChat(chatId = chatId))
/**
* Auto-generated from [GetChatAdministrators]
*/
public suspend inline fun Telegram.getChatAdministrators(chatId: ChatId): List =
call(GetChatAdministrators(chatId = chatId))
/**
* Auto-generated from [GetChatMember]
*/
public suspend inline fun Telegram.getChatMember(chatId: ChatId, userId: Long): ChatMember =
call(GetChatMember(chatId = chatId, userId = userId))
/**
* Auto-generated from [GetChatMemberCount]
*/
public suspend inline fun Telegram.getChatMemberCount(chatId: ChatId): Int =
call(GetChatMemberCount(chatId = chatId))
/**
* Auto-generated from [GetChatMenuButton]
*/
public suspend inline fun Telegram.getChatMenuButton(chatId: Long? = null): Boolean =
call(GetChatMenuButton(chatId = chatId))
/**
* Auto-generated from [GetCustomEmojiStickers]
*/
public suspend inline fun Telegram.getCustomEmojiStickers(customEmojiIds: List):
List = call(GetCustomEmojiStickers(customEmojiIds = customEmojiIds))
/**
* Auto-generated from [GetFile]
*/
public suspend inline fun Telegram.getFile(fileId: String): File = call(GetFile(fileId = fileId))
/**
* Auto-generated from [GetForumTopicIconStickers]
*/
public suspend inline fun Telegram.getForumTopicIconStickers(): List =
call(GetForumTopicIconStickers)
/**
* Auto-generated from [GetGameHighScores]
*/
public suspend inline fun Telegram.getGameHighScores(
userId: Long,
chatId: ChatId? = null,
messageId: Long? = null,
inlineMessageId: String? = null,
): List = call(GetGameHighScores(userId = userId, chatId = chatId, messageId =
messageId, inlineMessageId = inlineMessageId))
/**
* Auto-generated from [GetMe]
*/
public suspend inline fun Telegram.getMe(): Me = call(GetMe)
/**
* Auto-generated from [GetMyCommands]
*/
public suspend inline fun Telegram.getMyCommands(scope: BotCommandScope, languageCode: String? =
null): Boolean = call(GetMyCommands(scope = scope, languageCode = languageCode))
/**
* Auto-generated from [GetMyDefaultAdministratorRights]
*/
public suspend inline fun Telegram.getMyDefaultAdministratorRights(forChannels: Boolean = false):
ChatAdministratorRights = call(GetMyDefaultAdministratorRights(forChannels = forChannels))
/**
* Auto-generated from [GetMyDescription]
*/
public suspend inline fun Telegram.getMyDescription(languageCode: String? = null): BotDescription =
call(GetMyDescription(languageCode = languageCode))
/**
* Auto-generated from [GetMyName]
*/
public suspend inline fun Telegram.getMyName(languageCode: String? = null): BotName =
call(GetMyName(languageCode = languageCode))
/**
* Auto-generated from [GetMyShortDescription]
*/
public suspend inline fun Telegram.getMyShortDescription(languageCode: String? = null):
BotShortDescription = call(GetMyShortDescription(languageCode = languageCode))
/**
* Auto-generated from [GetStickerSet]
*/
public suspend inline fun Telegram.getStickerSet(name: String): StickerSet = call(GetStickerSet(name
= name))
/**
* Auto-generated from [GetUserChatBoosts]
*/
public suspend inline fun Telegram.getUserChatBoosts(chatId: ChatId, userId: Long): UserChatBoosts =
call(GetUserChatBoosts(chatId = chatId, userId = userId))
/**
* Auto-generated from [GetUserProfilePhotos]
*/
public suspend inline fun Telegram.getUserProfilePhotos(
userId: Long,
offset: Long = GetUserProfilePhotos.Defaults.offset,
limit: Long = GetUserProfilePhotos.Defaults.limit,
): List = call(GetUserProfilePhotos(userId = userId, offset = offset, limit =
limit))
/**
* Auto-generated from [GetWebHookInfo]
*/
public suspend inline fun Telegram.getWebHookInfo(): WebhookInfo = call(GetWebHookInfo)
/**
* Auto-generated from [HideGeneralForumTopic]
*/
public suspend inline fun Telegram.hideGeneralForumTopic(chatId: ChatId): Boolean =
call(HideGeneralForumTopic(chatId = chatId))
/**
* Auto-generated from [LeaveChat]
*/
public suspend inline fun Telegram.leaveChat(chatId: ChatId): Boolean = call(LeaveChat(chatId =
chatId))
/**
* Auto-generated from [LogOut]
*/
public suspend inline fun Telegram.logOut(): Boolean = call(LogOut)
/**
* Auto-generated from [PinChatMessage]
*/
public suspend inline fun Telegram.pinChatMessage(
chatId: ChatId,
messageId: Long,
disableNotification: Boolean = false,
): Boolean = call(PinChatMessage(chatId = chatId, messageId = messageId, disableNotification =
disableNotification))
/**
* Auto-generated from [PromoteChatMember]
*/
public suspend inline fun Telegram.promoteChatMember(
chatId: ChatId,
userId: Long,
isAnonymous: Boolean = false,
canManageChat: Boolean = false,
canPostMessages: Boolean = false,
canEditMessages: Boolean = false,
canDeleteMessages: Boolean = false,
canManageVideoChats: Boolean = false,
canRestrictMembers: Boolean = false,
canPromoteMembers: Boolean = false,
canChangeInfo: Boolean = false,
canInviteUsers: Boolean = false,
canPinMessages: Boolean = false,
canManageTopics: Boolean = false,
canPostStories: Boolean = false,
canEditStories: Boolean = false,
canDeleteStories: Boolean = false,
): Boolean = call(PromoteChatMember(chatId = chatId, userId = userId, isAnonymous = isAnonymous,
canManageChat = canManageChat, canPostMessages = canPostMessages, canEditMessages =
canEditMessages, canDeleteMessages = canDeleteMessages, canManageVideoChats =
canManageVideoChats, canRestrictMembers = canRestrictMembers, canPromoteMembers =
canPromoteMembers, canChangeInfo = canChangeInfo, canInviteUsers = canInviteUsers,
canPinMessages = canPinMessages, canManageTopics = canManageTopics, canPostStories =
canPostStories, canEditStories = canEditStories, canDeleteStories = canDeleteStories))
/**
* Auto-generated from [ReopenForumTopic]
*/
public suspend inline fun Telegram.reopenForumTopic(chatId: ChatId, messageThreadId: Long): Boolean
= call(ReopenForumTopic(chatId = chatId, messageThreadId = messageThreadId))
/**
* Auto-generated from [ReopenGeneralForumTopic]
*/
public suspend inline fun Telegram.reopenGeneralForumTopic(chatId: ChatId): Boolean =
call(ReopenGeneralForumTopic(chatId = chatId))
/**
* Auto-generated from [RestrictChatMember]
*/
public suspend inline fun Telegram.restrictChatMember(
chatId: ChatId,
userId: Long,
permissions: ChatPermissions,
untilDate: Instant? = null,
useIndependentChatPermissions: Boolean = false,
): Boolean = call(RestrictChatMember(chatId = chatId, userId = userId, permissions = permissions,
untilDate = untilDate, useIndependentChatPermissions = useIndependentChatPermissions))
/**
* Auto-generated from [RevokeChatInviteLink]
*/
public suspend inline fun Telegram.revokeChatInviteLink(chatId: ChatId, inviteLink: String):
ChatInviteLink = call(RevokeChatInviteLink(chatId = chatId, inviteLink = inviteLink))
/**
* Auto-generated from [SendAnimation]
*/
public suspend inline fun Telegram.sendAnimation(
chatId: ChatId,
animation: Attachment,
duration: Duration? = null,
width: Int? = null,
height: Int? = null,
thumbnail: Attachment? = null,
caption: String? = null,
parseMode: ParseMode? = null,
captionEntities: List? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
replyMarkup: ReplyMarkup? = null,
messageThreadId: Long? = null,
hasSpoiler: Boolean = false,
replyParameters: ReplyParameters? = null,
): Message = call(SendAnimation(chatId = chatId, animation = animation, duration = duration, width =
width, height = height, thumbnail = thumbnail, caption = caption, parseMode = parseMode,
captionEntities = captionEntities, disableNotification = disableNotification, protectContent =
protectContent, replyMarkup = replyMarkup, messageThreadId = messageThreadId, hasSpoiler =
hasSpoiler, replyParameters = replyParameters))
/**
* Auto-generated from [SendAudio]
*/
public suspend inline fun Telegram.sendAudio(
chatId: ChatId,
audio: Attachment,
caption: String? = null,
parseMode: ParseMode? = null,
captionEntities: List? = null,
duration: Duration? = null,
performer: String? = null,
title: String? = null,
thumbnail: Attachment? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
replyMarkup: ReplyMarkup? = null,
messageThreadId: Long? = null,
replyParameters: ReplyParameters? = null,
): Message = call(SendAudio(chatId = chatId, audio = audio, caption = caption, parseMode =
parseMode, captionEntities = captionEntities, duration = duration, performer = performer, title
= title, thumbnail = thumbnail, disableNotification = disableNotification, protectContent =
protectContent, replyMarkup = replyMarkup, messageThreadId = messageThreadId, replyParameters =
replyParameters))
/**
* Auto-generated from [SendChatAction]
*/
public suspend inline fun Telegram.sendChatAction(
chatId: ChatId,
action: ChatAction,
messageThreadId: Long? = null,
): Boolean = call(SendChatAction(chatId = chatId, action = action, messageThreadId =
messageThreadId))
/**
* Auto-generated from [SendContact]
*/
public suspend inline fun Telegram.sendContact(
chatId: ChatId,
phoneNumber: String,
firstName: String,
lastName: String? = null,
vcard: String? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
replyMarkup: ReplyMarkup? = null,
messageThreadId: Long? = null,
replyParameters: ReplyParameters? = null,
): Message = call(SendContact(chatId = chatId, phoneNumber = phoneNumber, firstName = firstName,
lastName = lastName, vcard = vcard, disableNotification = disableNotification, protectContent =
protectContent, replyMarkup = replyMarkup, messageThreadId = messageThreadId, replyParameters =
replyParameters))
/**
* Auto-generated from [SendDice]
*/
public suspend inline fun Telegram.sendDice(
chatId: ChatId,
emoji: DiceEmoji? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
replyMarkup: ReplyMarkup? = null,
messageThreadId: Long? = null,
replyParameters: ReplyParameters? = null,
): Message = call(SendDice(chatId = chatId, emoji = emoji, disableNotification =
disableNotification, protectContent = protectContent, replyMarkup = replyMarkup, messageThreadId
= messageThreadId, replyParameters = replyParameters))
/**
* Auto-generated from [SendDocument]
*/
public suspend inline fun Telegram.sendDocument(
chatId: ChatId,
document: Attachment,
thumbnail: Attachment? = null,
caption: String? = null,
parseMode: ParseMode? = null,
captionEntities: List? = null,
disableContentTypeDetection: Boolean = false,
disableNotification: Boolean = false,
protectContent: Boolean = false,
replyMarkup: ReplyMarkup? = null,
messageThreadId: Long? = null,
replyParameters: ReplyParameters? = null,
): Message = call(SendDocument(chatId = chatId, document = document, thumbnail = thumbnail, caption
= caption, parseMode = parseMode, captionEntities = captionEntities, disableContentTypeDetection
= disableContentTypeDetection, disableNotification = disableNotification, protectContent =
protectContent, replyMarkup = replyMarkup, messageThreadId = messageThreadId, replyParameters =
replyParameters))
/**
* Auto-generated from [SendGame]
*/
public suspend inline fun Telegram.sendGame(
chatId: ChatId,
gameShortname: String,
disableNotification: Boolean = false,
protectContent: Boolean = false,
replyMarkup: ReplyMarkup? = null,
messageThreadId: Long? = null,
replyParameters: ReplyParameters? = null,
): Boolean = call(SendGame(chatId = chatId, gameShortname = gameShortname, disableNotification =
disableNotification, protectContent = protectContent, replyMarkup = replyMarkup, messageThreadId
= messageThreadId, replyParameters = replyParameters))
/**
* Auto-generated from [SendInvoice]
*/
public suspend inline fun Telegram.sendInvoice(
chatId: ChatId,
title: String,
description: String,
payload: String,
providerToken: String,
currency: String,
prices: List,
maxTipAmount: Int? = null,
suggestedTipAmounts: List? = null,
startParameter: String? = null,
providerData: String? = null,
photoUrl: String? = null,
photoSize: Int? = null,
photoWidth: Int? = null,
photoHeight: Int? = null,
needName: Boolean = false,
needPhoneNumber: Boolean = false,
needEmail: Boolean = false,
needShippingAddress: Boolean = false,
sendPhoneNumberToProvider: Boolean = false,
sendEmailToProvider: Boolean = false,
isFlexible: Boolean = false,
disableNotification: Boolean = false,
protectContent: Boolean = false,
replyMarkup: ReplyMarkup? = null,
messageThreadId: Long? = null,
replyParameters: ReplyParameters? = null,
): Message = call(SendInvoice(chatId = chatId, title = title, description = description, payload =
payload, providerToken = providerToken, currency = currency, prices = prices, maxTipAmount =
maxTipAmount, suggestedTipAmounts = suggestedTipAmounts, startParameter = startParameter,
providerData = providerData, photoUrl = photoUrl, photoSize = photoSize, photoWidth =
photoWidth, photoHeight = photoHeight, needName = needName, needPhoneNumber = needPhoneNumber,
needEmail = needEmail, needShippingAddress = needShippingAddress, sendPhoneNumberToProvider =
sendPhoneNumberToProvider, sendEmailToProvider = sendEmailToProvider, isFlexible = isFlexible,
disableNotification = disableNotification, protectContent = protectContent, replyMarkup =
replyMarkup, messageThreadId = messageThreadId, replyParameters = replyParameters))
/**
* Auto-generated from [SendLocation]
*/
public suspend inline fun Telegram.sendLocation(
chatId: ChatId,
latitude: Double,
longitude: Double,
horizontalAccuracy: Double? = null,
livePeriod: Duration? = null,
heading: Int? = null,
proximityAlertRadius: Int? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
replyMarkup: ReplyMarkup? = null,
messageThreadId: Long? = null,
replyParameters: ReplyParameters? = null,
): Message = call(SendLocation(chatId = chatId, latitude = latitude, longitude = longitude,
horizontalAccuracy = horizontalAccuracy, livePeriod = livePeriod, heading = heading,
proximityAlertRadius = proximityAlertRadius, disableNotification = disableNotification,
protectContent = protectContent, replyMarkup = replyMarkup, messageThreadId = messageThreadId,
replyParameters = replyParameters))
/**
* Auto-generated from [SendMediaGroup]
*/
public suspend inline fun Telegram.sendMediaGroup(
chatId: ChatId,
media: List,
disableNotification: Boolean = false,
protectContent: Boolean = false,
messageThreadId: Long? = null,
replyParameters: ReplyParameters? = null,
): List = call(SendMediaGroup(chatId = chatId, media = media, disableNotification =
disableNotification, protectContent = protectContent, messageThreadId = messageThreadId,
replyParameters = replyParameters))
/**
* Auto-generated from [SendMessage]
*/
public suspend inline fun Telegram.sendMessage(
chatId: ChatId,
text: String,
parseMode: ParseMode? = null,
entities: List? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
replyMarkup: ReplyMarkup? = null,
messageThreadId: Long? = null,
replyParameters: ReplyParameters? = null,
linkPreviewOptions: LinkPreviewOptions? = null,
): Message = call(SendMessage(chatId = chatId, text = text, parseMode = parseMode, entities =
entities, disableNotification = disableNotification, protectContent = protectContent,
replyMarkup = replyMarkup, messageThreadId = messageThreadId, replyParameters = replyParameters,
linkPreviewOptions = linkPreviewOptions))
/**
* Auto-generated from [SendPhoto]
*/
public suspend inline fun Telegram.sendPhoto(
chatId: ChatId,
photo: Attachment,
caption: String? = null,
parseMode: ParseMode? = null,
captionEntities: List? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
replyMarkup: ReplyMarkup? = null,
messageThreadId: Long? = null,
hasSpoiler: Boolean = false,
replyParameters: ReplyParameters? = null,
): Message = call(SendPhoto(chatId = chatId, photo = photo, caption = caption, parseMode =
parseMode, captionEntities = captionEntities, disableNotification = disableNotification,
protectContent = protectContent, replyMarkup = replyMarkup, messageThreadId = messageThreadId,
hasSpoiler = hasSpoiler, replyParameters = replyParameters))
/**
* Auto-generated from [SendPoll]
*/
public suspend inline fun Telegram.sendPoll(
chatId: ChatId,
question: String,
options: List,
isAnonymous: Boolean = SendPoll.Defaults.isAnonymous,
type: PollType,
allowsMultipleAnswers: Boolean = false,
correctOptionId: Int? = null,
explanation: String? = null,
explanationParseMode: ParseMode? = null,
explanationEntities: List? = null,
openPeriod: Duration? = null,
closeDate: Instant? = null,
isClosed: Boolean? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
replyMarkup: ReplyMarkup? = null,
messageThreadId: Long? = null,
replyParameters: ReplyParameters? = null,
): Message = call(SendPoll(chatId = chatId, question = question, options = options, isAnonymous =
isAnonymous, type = type, allowsMultipleAnswers = allowsMultipleAnswers, correctOptionId =
correctOptionId, explanation = explanation, explanationParseMode = explanationParseMode,
explanationEntities = explanationEntities, openPeriod = openPeriod, closeDate = closeDate,
isClosed = isClosed, disableNotification = disableNotification, protectContent = protectContent,
replyMarkup = replyMarkup, messageThreadId = messageThreadId, replyParameters =
replyParameters))
/**
* Auto-generated from [SendSticker]
*/
public suspend inline fun Telegram.sendSticker(
chatId: ChatId,
sticker: Attachment,
disableNotification: Boolean = false,
protectContent: Boolean = false,
replyMarkup: ReplyMarkup? = null,
messageThreadId: Long? = null,
emoji: String? = null,
replyParameters: ReplyParameters? = null,
): Message = call(SendSticker(chatId = chatId, sticker = sticker, disableNotification =
disableNotification, protectContent = protectContent, replyMarkup = replyMarkup, messageThreadId
= messageThreadId, emoji = emoji, replyParameters = replyParameters))
/**
* Auto-generated from [SendVenue]
*/
public suspend inline fun Telegram.sendVenue(
chatId: ChatId,
latitude: Double,
longitude: Double,
title: String,
address: String,
foursquareId: String? = null,
foursquareType: String? = null,
googlePlaceId: String? = null,
googlePlaceType: String? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
replyMarkup: ReplyMarkup? = null,
messageThreadId: Long? = null,
replyParameters: ReplyParameters? = null,
): Message = call(SendVenue(chatId = chatId, latitude = latitude, longitude = longitude, title =
title, address = address, foursquareId = foursquareId, foursquareType = foursquareType,
googlePlaceId = googlePlaceId, googlePlaceType = googlePlaceType, disableNotification =
disableNotification, protectContent = protectContent, replyMarkup = replyMarkup, messageThreadId
= messageThreadId, replyParameters = replyParameters))
/**
* Auto-generated from [SendVideo]
*/
public suspend inline fun Telegram.sendVideo(
chatId: ChatId,
video: Attachment,
duration: Duration? = null,
width: Int? = null,
height: Int? = null,
thumbnail: Attachment? = null,
caption: String? = null,
parseMode: ParseMode? = null,
captionEntities: List? = null,
supportsStreaming: Boolean = false,
disableNotification: Boolean = false,
protectContent: Boolean = false,
replyMarkup: ReplyMarkup? = null,
messageThreadId: Long? = null,
hasSpoiler: Boolean = false,
replyParameters: ReplyParameters? = null,
): Message = call(SendVideo(chatId = chatId, video = video, duration = duration, width = width,
height = height, thumbnail = thumbnail, caption = caption, parseMode = parseMode,
captionEntities = captionEntities, supportsStreaming = supportsStreaming, disableNotification =
disableNotification, protectContent = protectContent, replyMarkup = replyMarkup, messageThreadId
= messageThreadId, hasSpoiler = hasSpoiler, replyParameters = replyParameters))
/**
* Auto-generated from [SendVideoNote]
*/
public suspend inline fun Telegram.sendVideoNote(
chatId: ChatId,
videoNote: Attachment,
duration: Duration? = null,
length: Int? = null,
thumbnail: Attachment? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
replyMarkup: ReplyMarkup? = null,
messageThreadId: Long? = null,
replyParameters: ReplyParameters? = null,
): Message = call(SendVideoNote(chatId = chatId, videoNote = videoNote, duration = duration, length
= length, thumbnail = thumbnail, disableNotification = disableNotification, protectContent =
protectContent, replyMarkup = replyMarkup, messageThreadId = messageThreadId, replyParameters =
replyParameters))
/**
* Auto-generated from [SendVoice]
*/
public suspend inline fun Telegram.sendVoice(
chatId: ChatId,
voice: Attachment,
caption: String? = null,
parseMode: ParseMode? = null,
captionEntitites: List? = null,
duration: Duration? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
replyMarkup: ReplyMarkup? = null,
messageThreadId: Long? = null,
replyParameters: ReplyParameters? = null,
): Message = call(SendVoice(chatId = chatId, voice = voice, caption = caption, parseMode =
parseMode, captionEntitites = captionEntitites, duration = duration, disableNotification =
disableNotification, protectContent = protectContent, replyMarkup = replyMarkup, messageThreadId
= messageThreadId, replyParameters = replyParameters))
/**
* Auto-generated from [SetChatAdministratorCustomTitle]
*/
public suspend inline fun Telegram.setChatAdministratorCustomTitle(
chatId: ChatId,
userId: Long,
customTitle: String,
): Boolean = call(SetChatAdministratorCustomTitle(chatId = chatId, userId = userId, customTitle =
customTitle))
/**
* Auto-generated from [SetChatDescription]
*/
public suspend inline fun Telegram.setChatDescription(chatId: ChatId, description: String): Boolean
= call(SetChatDescription(chatId = chatId, description = description))
/**
* Auto-generated from [SetChatMenuButton]
*/
public suspend inline fun Telegram.setChatMenuButton(chatId: Long? = null, menuButton: MenuButton? =
null): Boolean = call(SetChatMenuButton(chatId = chatId, menuButton = menuButton))
/**
* Auto-generated from [SetChatPermissions]
*/
public suspend inline fun Telegram.setChatPermissions(
chatId: ChatId,
permissions: ChatPermissions,
useIndependentChatPermissions: Boolean = false,
): Boolean = call(SetChatPermissions(chatId = chatId, permissions = permissions,
useIndependentChatPermissions = useIndependentChatPermissions))
/**
* Auto-generated from [SetChatPhoto]
*/
public suspend inline fun Telegram.setChatPhoto(chatId: ChatId, photo: Attachment): Message =
call(SetChatPhoto(chatId = chatId, photo = photo))
/**
* Auto-generated from [SetChatStickerSet]
*/
public suspend inline fun Telegram.setChatStickerSet(chatId: ChatId, stickerSetName: String):
Boolean = call(SetChatStickerSet(chatId = chatId, stickerSetName = stickerSetName))
/**
* Auto-generated from [SetChatTitle]
*/
public suspend inline fun Telegram.setChatTitle(chatId: ChatId, title: String): Boolean =
call(SetChatTitle(chatId = chatId, title = title))
/**
* Auto-generated from [SetCustomEmojiStickerSetThumbnail]
*/
public suspend inline fun Telegram.setCustomEmojiStickerSetThumbnail(name: String,
customEmojiId: String? = null): Message = call(SetCustomEmojiStickerSetThumbnail(name = name,
customEmojiId = customEmojiId))
/**
* Auto-generated from [SetGameScore]
*/
public suspend inline fun Telegram.setGameScore(
userId: Long,
score: Int,
force: Boolean = false,
disableEditMessage: Boolean = false,
chatId: ChatId? = null,
messageId: Long? = null,
inlineMessageId: Long? = null,
): Boolean = call(SetGameScore(userId = userId, score = score, force = force, disableEditMessage =
disableEditMessage, chatId = chatId, messageId = messageId, inlineMessageId = inlineMessageId))
/**
* Auto-generated from [SetMessageReaction]
*/
public suspend inline fun Telegram.setMessageReaction(
chatId: ChatId,
messageId: Long,
reaction: List,
isBig: Boolean = false,
): Boolean = call(SetMessageReaction(chatId = chatId, messageId = messageId, reaction = reaction,
isBig = isBig))
/**
* Auto-generated from [SetMyCommands]
*/
public suspend inline fun Telegram.setMyCommands(
commands: List,
scope: BotCommandScope,
languageCode: String? = null,
): Boolean = call(SetMyCommands(commands = commands, scope = scope, languageCode = languageCode))
/**
* Auto-generated from [SetMyDefaultAdministratorRights]
*/
public suspend inline fun Telegram.setMyDefaultAdministratorRights(rights: ChatAdministratorRights?
= null, forChannels: Boolean = false): Boolean = call(SetMyDefaultAdministratorRights(rights =
rights, forChannels = forChannels))
/**
* Auto-generated from [SetMyDescription]
*/
public suspend inline fun Telegram.setMyDescription(description: String, languageCode: String? =
null): Boolean = call(SetMyDescription(description = description, languageCode = languageCode))
/**
* Auto-generated from [SetMyName]
*/
public suspend inline fun Telegram.setMyName(name: String, languageCode: String? = null): Boolean =
call(SetMyName(name = name, languageCode = languageCode))
/**
* Auto-generated from [SetMyShortDescription]
*/
public suspend inline fun Telegram.setMyShortDescription(shortDescription: String,
languageCode: String? = null): Boolean = call(SetMyShortDescription(shortDescription =
shortDescription, languageCode = languageCode))
/**
* Auto-generated from [SetPassportDataErrors]
*/
public suspend inline fun Telegram.setPassportDataErrors(userId: Long,
errors: List): Boolean = call(SetPassportDataErrors(userId = userId,
errors = errors))
/**
* Auto-generated from [SetStickerEmojiList]
*/
public suspend inline fun Telegram.setStickerEmojiList(sticker: String, emojiList: List):
Message = call(SetStickerEmojiList(sticker = sticker, emojiList = emojiList))
/**
* Auto-generated from [SetStickerKeywords]
*/
public suspend inline fun Telegram.setStickerKeywords(sticker: String, keywords: List):
Message = call(SetStickerKeywords(sticker = sticker, keywords = keywords))
/**
* Auto-generated from [SetStickerMaskPosition]
*/
public suspend inline fun Telegram.setStickerMaskPosition(sticker: String,
maskPosition: MaskPosition? = null): Message = call(SetStickerMaskPosition(sticker = sticker,
maskPosition = maskPosition))
/**
* Auto-generated from [SetStickerPositionInSet]
*/
public suspend inline fun Telegram.setStickerPositionInSet(sticker: String, position: Int): Boolean
= call(SetStickerPositionInSet(sticker = sticker, position = position))
/**
* Auto-generated from [SetStickerSetThumbnail]
*/
public suspend inline fun Telegram.setStickerSetThumbnail(
name: String,
userId: Long,
thumbnail: Attachment,
): Message = call(SetStickerSetThumbnail(name = name, userId = userId, thumbnail = thumbnail))
/**
* Auto-generated from [SetStickerSetTitle]
*/
public suspend inline fun Telegram.setStickerSetTitle(name: String, title: String): Message =
call(SetStickerSetTitle(name = name, title = title))
/**
* Auto-generated from [SetWebhook]
*/
public suspend inline fun Telegram.setWebhook(
url: String,
certificate: Attachment? = null,
ipAddress: String? = null,
maxConnections: Int? = null,
allowedUpdates: List? = null,
dropPendingUpdates: Boolean = false,
secretToken: String? = null,
): Boolean = call(SetWebhook(url = url, certificate = certificate, ipAddress = ipAddress,
maxConnections = maxConnections, allowedUpdates = allowedUpdates, dropPendingUpdates =
dropPendingUpdates, secretToken = secretToken))
/**
* Auto-generated from [StopMessageLiveLocation]
*/
public suspend inline fun Telegram.stopMessageLiveLocation(
chatId: ChatId? = null,
messageId: Long? = null,
inlineMessageId: String? = null,
replyMarkup: ReplyMarkup? = null,
): Message = call(StopMessageLiveLocation(chatId = chatId, messageId = messageId, inlineMessageId =
inlineMessageId, replyMarkup = replyMarkup))
/**
* Auto-generated from [StopPoll]
*/
public suspend inline fun Telegram.stopPoll(
chatId: ChatId,
messageId: Long,
replyMarkup: InlineKeyboardMarkup? = null,
): Poll = call(StopPoll(chatId = chatId, messageId = messageId, replyMarkup = replyMarkup))
/**
* Auto-generated from [UnbanChatMember]
*/
public suspend inline fun Telegram.unbanChatMember(
chatId: ChatId,
userId: Long,
onlyIfBanned: Boolean = false,
): Boolean = call(UnbanChatMember(chatId = chatId, userId = userId, onlyIfBanned = onlyIfBanned))
/**
* Auto-generated from [UnbanChatSenderChat]
*/
public suspend inline fun Telegram.unbanChatSenderChat(chatId: ChatId, senderChatId: Long): Boolean
= call(UnbanChatSenderChat(chatId = chatId, senderChatId = senderChatId))
/**
* Auto-generated from [UnhideGeneralForumTopic]
*/
public suspend inline fun Telegram.unhideGeneralForumTopic(chatId: ChatId): Boolean =
call(UnhideGeneralForumTopic(chatId = chatId))
/**
* Auto-generated from [UnpinAllChatMessages]
*/
public suspend inline fun Telegram.unpinAllChatMessages(chatId: ChatId): Boolean =
call(UnpinAllChatMessages(chatId = chatId))
/**
* Auto-generated from [UnpinAllForumTopicMessages]
*/
public suspend inline fun Telegram.unpinAllForumTopicMessages(chatId: ChatId,
messageThreadId: Long): Boolean = call(UnpinAllForumTopicMessages(chatId = chatId,
messageThreadId = messageThreadId))
/**
* Auto-generated from [UnpinAllGeneralForumTopicMessages]
*/
public suspend inline fun Telegram.unpinAllGeneralForumTopicMessages(chatId: ChatId): Boolean =
call(UnpinAllGeneralForumTopicMessages(chatId = chatId))
/**
* Auto-generated from [UnpinChatMessage]
*/
public suspend inline fun Telegram.unpinChatMessage(chatId: ChatId, messageId: Long): Boolean =
call(UnpinChatMessage(chatId = chatId, messageId = messageId))
/**
* Auto-generated from [UploadStickerFile]
*/
public suspend inline fun Telegram.uploadStickerFile(
userId: Long,
sticker: Sticker,
stickerFormat: StickerFormat,
): Message = call(UploadStickerFile(userId = userId, sticker = sticker, stickerFormat =
stickerFormat))
© 2015 - 2025 Weber Informatics LLC | Privacy Policy