mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 00:03:48 +00:00
chats sealing
This commit is contained in:
parent
323c4de858
commit
a930423955
11
CHANGELOG.md
11
CHANGELOG.md
@ -11,6 +11,17 @@ __All the `tgbotapi.extensions.*` packages have been removed__
|
|||||||
* **`CallbackQuery` package renamed. Migration:** `dev.inmo.tgbotapi.types.CallbackQuery([\s\\.])` -> `dev.inmo.tgbotapi.types.queries.callback$1`
|
* **`CallbackQuery` package renamed. Migration:** `dev.inmo.tgbotapi.types.CallbackQuery([\s\\.])` -> `dev.inmo.tgbotapi.types.queries.callback$1`
|
||||||
* **`ChatMember` package renamed. Migration:** `dev.inmo.tgbotapi.types.ChatMember([\s\\.])` -> `dev.inmo.tgbotapi.types.chat.member$1`
|
* **`ChatMember` package renamed. Migration:** `dev.inmo.tgbotapi.types.ChatMember([\s\\.])` -> `dev.inmo.tgbotapi.types.chat.member$1`
|
||||||
* **`ChatAdministratorRightsImpl` replaced. Migration:** `dev.inmo.tgbotapi.types.ChatAdministratorRightsImpl` -> `dev.inmo.tgbotapi.types.chat.member.ChatAdministratorRightsImpl`
|
* **`ChatAdministratorRightsImpl` replaced. Migration:** `dev.inmo.tgbotapi.types.ChatAdministratorRightsImpl` -> `dev.inmo.tgbotapi.types.chat.member.ChatAdministratorRightsImpl`
|
||||||
|
* **`chat.abstract.extended` replaced. Migration:** `dev.inmo.tgbotapi.types.chat.abstract.extended` -> `dev.inmo.tgbotapi.types.chat.member.chat`
|
||||||
|
* **`chat.abstract` replaced. Migration:** `dev.inmo.tgbotapi.types.chat.abstract` -> `dev.inmo.tgbotapi.types.chat.member.chat`
|
||||||
|
* **`chat.extended` replaced. Migration:** `dev.inmo.tgbotapi.types.chat.extended` -> `dev.inmo.tgbotapi.types.chat.member.chat`
|
||||||
|
* **User interfaces have been fully replaced**:
|
||||||
|
* `dev.inmo.tgbotapi.types.User` -> `dev.inmo.tgbotapi.types.chat.User`
|
||||||
|
* `dev.inmo.tgbotapi.types.CommonUser` -> `dev.inmo.tgbotapi.types.chat.CommonUser`
|
||||||
|
* `dev.inmo.tgbotapi.types.ExtendedUser` -> `dev.inmo.tgbotapi.types.chat.ExtendedUser`
|
||||||
|
* `dev.inmo.tgbotapi.types.Bot` -> `dev.inmo.tgbotapi.types.chat.Bot`
|
||||||
|
* `dev.inmo.tgbotapi.types.CommonBot` -> `dev.inmo.tgbotapi.types.chat.CommonBot`
|
||||||
|
* `dev.inmo.tgbotapi.types.ExtendedBot` -> `dev.inmo.tgbotapi.types.chat.ExtendedBot`
|
||||||
|
* `dev.inmo.tgbotapi.types.UserSerializer` -> `dev.inmo.tgbotapi.types.chat.UserSerializer`
|
||||||
* Constructor of `UnknownInlineKeyboardButton` is not internal and can be created with any `json` ([#563](https://github.com/InsanusMokrassar/TelegramBotAPI/issues/563))
|
* Constructor of `UnknownInlineKeyboardButton` is not internal and can be created with any `json` ([#563](https://github.com/InsanusMokrassar/TelegramBotAPI/issues/563))
|
||||||
* All the interfaces from `dev.inmo.tgbotapi.types.files.abstracts` have been replaced to `dev.inmo.tgbotapi.types.files` and converted to sealed ([#550](https://github.com/InsanusMokrassar/TelegramBotAPI/issues/550))
|
* All the interfaces from `dev.inmo.tgbotapi.types.files.abstracts` have been replaced to `dev.inmo.tgbotapi.types.files` and converted to sealed ([#550](https://github.com/InsanusMokrassar/TelegramBotAPI/issues/550))
|
||||||
* `PassportFile` has been replaced to `dev.inmo.tgbotapi.types.files`
|
* `PassportFile` has been replaced to `dev.inmo.tgbotapi.types.files`
|
||||||
|
@ -4,7 +4,7 @@ import dev.inmo.tgbotapi.bot.TelegramBot
|
|||||||
import dev.inmo.tgbotapi.requests.DeleteMessage
|
import dev.inmo.tgbotapi.requests.DeleteMessage
|
||||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||||
import dev.inmo.tgbotapi.types.MessageIdentifier
|
import dev.inmo.tgbotapi.types.MessageIdentifier
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.Message
|
import dev.inmo.tgbotapi.types.message.abstracts.Message
|
||||||
|
|
||||||
suspend fun TelegramBot.deleteMessage(
|
suspend fun TelegramBot.deleteMessage(
|
||||||
|
@ -4,7 +4,7 @@ import dev.inmo.tgbotapi.bot.TelegramBot
|
|||||||
import dev.inmo.tgbotapi.requests.ForwardMessage
|
import dev.inmo.tgbotapi.requests.ForwardMessage
|
||||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||||
import dev.inmo.tgbotapi.types.MessageIdentifier
|
import dev.inmo.tgbotapi.types.MessageIdentifier
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.Message
|
import dev.inmo.tgbotapi.types.message.abstracts.Message
|
||||||
|
|
||||||
suspend fun TelegramBot.forwardMessage(
|
suspend fun TelegramBot.forwardMessage(
|
||||||
|
@ -9,7 +9,7 @@ import dev.inmo.tgbotapi.requests.send.SendLiveLocation
|
|||||||
import dev.inmo.tgbotapi.types.*
|
import dev.inmo.tgbotapi.types.*
|
||||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import dev.inmo.tgbotapi.types.location.LiveLocation
|
import dev.inmo.tgbotapi.types.location.LiveLocation
|
||||||
import dev.inmo.tgbotapi.types.location.StaticLocation
|
import dev.inmo.tgbotapi.types.location.StaticLocation
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||||
|
@ -4,7 +4,7 @@ import dev.inmo.tgbotapi.bot.TelegramBot
|
|||||||
import dev.inmo.tgbotapi.requests.StopPoll
|
import dev.inmo.tgbotapi.requests.StopPoll
|
||||||
import dev.inmo.tgbotapi.types.*
|
import dev.inmo.tgbotapi.types.*
|
||||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.Message
|
import dev.inmo.tgbotapi.types.message.abstracts.Message
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -3,7 +3,7 @@ package dev.inmo.tgbotapi.extensions.api.chat
|
|||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
import dev.inmo.tgbotapi.requests.chat.ExportChatInviteLink
|
import dev.inmo.tgbotapi.requests.chat.ExportChatInviteLink
|
||||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.PublicChat
|
import dev.inmo.tgbotapi.types.chat.PublicChat
|
||||||
|
|
||||||
suspend fun TelegramBot.exportChatInviteLink(
|
suspend fun TelegramBot.exportChatInviteLink(
|
||||||
chatId: ChatIdentifier
|
chatId: ChatIdentifier
|
||||||
|
@ -3,7 +3,7 @@ package dev.inmo.tgbotapi.extensions.api.chat
|
|||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
import dev.inmo.tgbotapi.requests.chat.LeaveChat
|
import dev.inmo.tgbotapi.requests.chat.LeaveChat
|
||||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.PublicChat
|
import dev.inmo.tgbotapi.types.chat.PublicChat
|
||||||
|
|
||||||
suspend fun TelegramBot.leaveChat(
|
suspend fun TelegramBot.leaveChat(
|
||||||
chatId: ChatIdentifier
|
chatId: ChatIdentifier
|
||||||
|
@ -2,11 +2,8 @@ package dev.inmo.tgbotapi.extensions.api.chat.get
|
|||||||
|
|
||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
import dev.inmo.tgbotapi.requests.chat.get.GetChat
|
import dev.inmo.tgbotapi.requests.chat.get.GetChat
|
||||||
import dev.inmo.tgbotapi.types.*
|
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||||
import dev.inmo.tgbotapi.types.chat.*
|
import dev.inmo.tgbotapi.types.chat.*
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.*
|
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.extended.*
|
|
||||||
import dev.inmo.tgbotapi.types.chat.extended.*
|
|
||||||
import dev.inmo.tgbotapi.utils.PreviewFeature
|
import dev.inmo.tgbotapi.utils.PreviewFeature
|
||||||
|
|
||||||
suspend fun TelegramBot.getChat(
|
suspend fun TelegramBot.getChat(
|
||||||
@ -18,7 +15,7 @@ suspend fun TelegramBot.getChat(
|
|||||||
) = getChat(chat.id)
|
) = getChat(chat.id)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Will cast incoming [dev.inmo.tgbotapi.types.chat.abstracts.extended.ExtendedChat] to a
|
* Will cast incoming [dev.inmo.tgbotapi.types.chat.ExtendedChat] to a
|
||||||
* [ExtendedPublicChat] with unsafe operator "as"
|
* [ExtendedPublicChat] with unsafe operator "as"
|
||||||
*
|
*
|
||||||
* @throws ClassCastException
|
* @throws ClassCastException
|
||||||
@ -30,7 +27,7 @@ suspend fun TelegramBot.getChat(
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Will cast incoming [dev.inmo.tgbotapi.types.chat.abstracts.extended.ExtendedChat] to a
|
* Will cast incoming [dev.inmo.tgbotapi.types.chat.ExtendedChat] to a
|
||||||
* [ExtendedChannelChat] with unsafe operator "as"
|
* [ExtendedChannelChat] with unsafe operator "as"
|
||||||
*
|
*
|
||||||
* @throws ClassCastException
|
* @throws ClassCastException
|
||||||
@ -41,7 +38,7 @@ suspend fun TelegramBot.getChat(
|
|||||||
) = getChat(chat.id) as ExtendedChannelChat
|
) = getChat(chat.id) as ExtendedChannelChat
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Will cast incoming [dev.inmo.tgbotapi.types.chat.abstracts.extended.ExtendedChat] to a
|
* Will cast incoming [dev.inmo.tgbotapi.types.chat.ExtendedChat] to a
|
||||||
* [ExtendedChannelChatImpl] with unsafe operator "as"
|
* [ExtendedChannelChatImpl] with unsafe operator "as"
|
||||||
*
|
*
|
||||||
* @throws ClassCastException
|
* @throws ClassCastException
|
||||||
@ -53,7 +50,7 @@ suspend fun TelegramBot.getChat(
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Will cast incoming [dev.inmo.tgbotapi.types.chat.abstracts.extended.ExtendedChat] to a
|
* Will cast incoming [dev.inmo.tgbotapi.types.chat.ExtendedChat] to a
|
||||||
* [ExtendedGroupChat] with unsafe operator "as"
|
* [ExtendedGroupChat] with unsafe operator "as"
|
||||||
*
|
*
|
||||||
* @throws ClassCastException
|
* @throws ClassCastException
|
||||||
@ -64,7 +61,7 @@ suspend fun TelegramBot.getChat(
|
|||||||
) = getChat(chat.id) as ExtendedGroupChat
|
) = getChat(chat.id) as ExtendedGroupChat
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Will cast incoming [dev.inmo.tgbotapi.types.chat.abstracts.extended.ExtendedChat] to a
|
* Will cast incoming [dev.inmo.tgbotapi.types.chat.ExtendedChat] to a
|
||||||
* [ExtendedGroupChatImpl] with unsafe operator "as"
|
* [ExtendedGroupChatImpl] with unsafe operator "as"
|
||||||
*
|
*
|
||||||
* @throws ClassCastException
|
* @throws ClassCastException
|
||||||
@ -76,7 +73,7 @@ suspend fun TelegramBot.getChat(
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Will cast incoming [dev.inmo.tgbotapi.types.chat.abstracts.extended.ExtendedChat] to a
|
* Will cast incoming [dev.inmo.tgbotapi.types.chat.ExtendedChat] to a
|
||||||
* [ExtendedSupergroupChat] with unsafe operator "as"
|
* [ExtendedSupergroupChat] with unsafe operator "as"
|
||||||
*
|
*
|
||||||
* @throws ClassCastException
|
* @throws ClassCastException
|
||||||
@ -87,7 +84,7 @@ suspend fun TelegramBot.getChat(
|
|||||||
) = getChat(chat.id) as ExtendedSupergroupChat
|
) = getChat(chat.id) as ExtendedSupergroupChat
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Will cast incoming [dev.inmo.tgbotapi.types.chat.abstracts.extended.ExtendedChat] to a
|
* Will cast incoming [dev.inmo.tgbotapi.types.chat.ExtendedChat] to a
|
||||||
* [ExtendedSupergroupChatImpl] with unsafe operator "as"
|
* [ExtendedSupergroupChatImpl] with unsafe operator "as"
|
||||||
*
|
*
|
||||||
* @throws ClassCastException
|
* @throws ClassCastException
|
||||||
@ -99,7 +96,7 @@ suspend fun TelegramBot.getChat(
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Will cast incoming [dev.inmo.tgbotapi.types.chat.abstracts.extended.ExtendedChat] to a
|
* Will cast incoming [dev.inmo.tgbotapi.types.chat.ExtendedChat] to a
|
||||||
* [ExtendedPrivateChat] with unsafe operator "as"
|
* [ExtendedPrivateChat] with unsafe operator "as"
|
||||||
*
|
*
|
||||||
* @throws ClassCastException
|
* @throws ClassCastException
|
||||||
@ -110,7 +107,7 @@ suspend fun TelegramBot.getChat(
|
|||||||
) = getChat(chat.id) as ExtendedPrivateChat
|
) = getChat(chat.id) as ExtendedPrivateChat
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Will cast incoming [dev.inmo.tgbotapi.types.chat.abstracts.extended.ExtendedChat] to a
|
* Will cast incoming [dev.inmo.tgbotapi.types.chat.ExtendedChat] to a
|
||||||
* [ExtendedPrivateChatImpl] with unsafe operator "as"
|
* [ExtendedPrivateChatImpl] with unsafe operator "as"
|
||||||
*
|
*
|
||||||
* @throws ClassCastException
|
* @throws ClassCastException
|
||||||
@ -121,7 +118,7 @@ suspend fun TelegramBot.getChat(
|
|||||||
) = getChat(chat.id) as ExtendedPrivateChatImpl
|
) = getChat(chat.id) as ExtendedPrivateChatImpl
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Will cast incoming [dev.inmo.tgbotapi.types.chat.abstracts.extended.ExtendedChat] to a
|
* Will cast incoming [dev.inmo.tgbotapi.types.chat.ExtendedChat] to a
|
||||||
* [ExtendedUser] with unsafe operator "as"
|
* [ExtendedUser] with unsafe operator "as"
|
||||||
*
|
*
|
||||||
* @throws ClassCastException
|
* @throws ClassCastException
|
||||||
|
@ -3,7 +3,7 @@ package dev.inmo.tgbotapi.extensions.api.chat.get
|
|||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
import dev.inmo.tgbotapi.requests.chat.get.GetChatAdministrators
|
import dev.inmo.tgbotapi.requests.chat.get.GetChatAdministrators
|
||||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.PublicChat
|
import dev.inmo.tgbotapi.types.chat.PublicChat
|
||||||
|
|
||||||
suspend fun TelegramBot.getChatAdministrators(
|
suspend fun TelegramBot.getChatAdministrators(
|
||||||
chatId: ChatIdentifier
|
chatId: ChatIdentifier
|
||||||
|
@ -3,7 +3,7 @@ package dev.inmo.tgbotapi.extensions.api.chat.get
|
|||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
import dev.inmo.tgbotapi.requests.chat.get.GetChatMemberCount
|
import dev.inmo.tgbotapi.requests.chat.get.GetChatMemberCount
|
||||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.PublicChat
|
import dev.inmo.tgbotapi.types.chat.PublicChat
|
||||||
|
|
||||||
suspend fun TelegramBot.getChatMemberCount(
|
suspend fun TelegramBot.getChatMemberCount(
|
||||||
chatId: ChatIdentifier
|
chatId: ChatIdentifier
|
||||||
|
@ -2,9 +2,8 @@ package dev.inmo.tgbotapi.extensions.api.chat.get
|
|||||||
|
|
||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
import dev.inmo.tgbotapi.requests.chat.get.GetChatMenuButton
|
import dev.inmo.tgbotapi.requests.chat.get.GetChatMenuButton
|
||||||
import dev.inmo.tgbotapi.requests.chat.modify.*
|
|
||||||
import dev.inmo.tgbotapi.types.*
|
import dev.inmo.tgbotapi.types.*
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.PrivateChat
|
import dev.inmo.tgbotapi.types.chat.PrivateChat
|
||||||
|
|
||||||
suspend fun TelegramBot.getChatMenuButton(
|
suspend fun TelegramBot.getChatMenuButton(
|
||||||
chatId: ChatId
|
chatId: ChatId
|
||||||
|
@ -3,7 +3,8 @@ package dev.inmo.tgbotapi.extensions.api.chat.invite_links
|
|||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
import dev.inmo.tgbotapi.requests.chat.invite_links.ApproveChatJoinRequest
|
import dev.inmo.tgbotapi.requests.chat.invite_links.ApproveChatJoinRequest
|
||||||
import dev.inmo.tgbotapi.types.*
|
import dev.inmo.tgbotapi.types.*
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.PublicChat
|
import dev.inmo.tgbotapi.types.chat.*
|
||||||
|
import dev.inmo.tgbotapi.types.chat.User
|
||||||
import dev.inmo.tgbotapi.types.update.ChatJoinRequestUpdate
|
import dev.inmo.tgbotapi.types.update.ChatJoinRequestUpdate
|
||||||
|
|
||||||
suspend fun TelegramBot.approveChatJoinRequest(
|
suspend fun TelegramBot.approveChatJoinRequest(
|
||||||
|
@ -4,7 +4,7 @@ import com.soywiz.klock.DateTime
|
|||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
import dev.inmo.tgbotapi.requests.chat.invite_links.CreateChatInviteLink
|
import dev.inmo.tgbotapi.requests.chat.invite_links.CreateChatInviteLink
|
||||||
import dev.inmo.tgbotapi.types.*
|
import dev.inmo.tgbotapi.types.*
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.PublicChat
|
import dev.inmo.tgbotapi.types.chat.PublicChat
|
||||||
|
|
||||||
suspend fun TelegramBot.createChatInviteLinkUnlimited(
|
suspend fun TelegramBot.createChatInviteLinkUnlimited(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
package dev.inmo.tgbotapi.extensions.api.chat.invite_links
|
package dev.inmo.tgbotapi.extensions.api.chat.invite_links
|
||||||
|
|
||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
import dev.inmo.tgbotapi.requests.chat.invite_links.ApproveChatJoinRequest
|
|
||||||
import dev.inmo.tgbotapi.requests.chat.invite_links.DeclineChatJoinRequest
|
import dev.inmo.tgbotapi.requests.chat.invite_links.DeclineChatJoinRequest
|
||||||
import dev.inmo.tgbotapi.types.*
|
import dev.inmo.tgbotapi.types.*
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.PublicChat
|
import dev.inmo.tgbotapi.types.chat.*
|
||||||
|
import dev.inmo.tgbotapi.types.chat.User
|
||||||
import dev.inmo.tgbotapi.types.update.ChatJoinRequestUpdate
|
import dev.inmo.tgbotapi.types.update.ChatJoinRequestUpdate
|
||||||
|
|
||||||
suspend fun TelegramBot.declineChatJoinRequest(
|
suspend fun TelegramBot.declineChatJoinRequest(
|
||||||
|
@ -4,7 +4,7 @@ import com.soywiz.klock.DateTime
|
|||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
import dev.inmo.tgbotapi.requests.chat.invite_links.EditChatInviteLink
|
import dev.inmo.tgbotapi.requests.chat.invite_links.EditChatInviteLink
|
||||||
import dev.inmo.tgbotapi.types.*
|
import dev.inmo.tgbotapi.types.*
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.PublicChat
|
import dev.inmo.tgbotapi.types.chat.PublicChat
|
||||||
|
|
||||||
suspend fun TelegramBot.editChatInviteLinkUnlimited(
|
suspend fun TelegramBot.editChatInviteLinkUnlimited(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
|
@ -4,7 +4,7 @@ import dev.inmo.tgbotapi.bot.TelegramBot
|
|||||||
import dev.inmo.tgbotapi.requests.chat.invite_links.RevokeChatInviteLink
|
import dev.inmo.tgbotapi.requests.chat.invite_links.RevokeChatInviteLink
|
||||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||||
import dev.inmo.tgbotapi.types.ChatInviteLink
|
import dev.inmo.tgbotapi.types.ChatInviteLink
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.PublicChat
|
import dev.inmo.tgbotapi.types.chat.PublicChat
|
||||||
|
|
||||||
suspend fun TelegramBot.revokeChatInviteLink(
|
suspend fun TelegramBot.revokeChatInviteLink(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
|
@ -3,7 +3,8 @@ package dev.inmo.tgbotapi.extensions.api.chat.members
|
|||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
import dev.inmo.tgbotapi.requests.chat.members.BanChatMember
|
import dev.inmo.tgbotapi.requests.chat.members.BanChatMember
|
||||||
import dev.inmo.tgbotapi.types.*
|
import dev.inmo.tgbotapi.types.*
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.PublicChat
|
import dev.inmo.tgbotapi.types.chat.PublicChat
|
||||||
|
import dev.inmo.tgbotapi.types.chat.User
|
||||||
|
|
||||||
suspend fun TelegramBot.banChatMember(
|
suspend fun TelegramBot.banChatMember(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
package dev.inmo.tgbotapi.extensions.api.chat.members
|
package dev.inmo.tgbotapi.extensions.api.chat.members
|
||||||
|
|
||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
import dev.inmo.tgbotapi.requests.chat.members.BanChatMember
|
|
||||||
import dev.inmo.tgbotapi.requests.chat.members.BanChatSenderChat
|
import dev.inmo.tgbotapi.requests.chat.members.BanChatSenderChat
|
||||||
import dev.inmo.tgbotapi.types.*
|
import dev.inmo.tgbotapi.types.*
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.PublicChat
|
import dev.inmo.tgbotapi.types.chat.PublicChat
|
||||||
|
|
||||||
suspend fun TelegramBot.banChatSenderChat(
|
suspend fun TelegramBot.banChatSenderChat(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
|
@ -3,7 +3,8 @@ package dev.inmo.tgbotapi.extensions.api.chat.members
|
|||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
import dev.inmo.tgbotapi.requests.chat.members.GetChatMember
|
import dev.inmo.tgbotapi.requests.chat.members.GetChatMember
|
||||||
import dev.inmo.tgbotapi.types.*
|
import dev.inmo.tgbotapi.types.*
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.PublicChat
|
import dev.inmo.tgbotapi.types.chat.PublicChat
|
||||||
|
import dev.inmo.tgbotapi.types.chat.User
|
||||||
|
|
||||||
suspend fun TelegramBot.getChatMember(
|
suspend fun TelegramBot.getChatMember(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
|
@ -3,7 +3,8 @@ package dev.inmo.tgbotapi.extensions.api.chat.members
|
|||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
import dev.inmo.tgbotapi.requests.chat.members.PromoteChatMember
|
import dev.inmo.tgbotapi.requests.chat.members.PromoteChatMember
|
||||||
import dev.inmo.tgbotapi.types.*
|
import dev.inmo.tgbotapi.types.*
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.PublicChat
|
import dev.inmo.tgbotapi.types.chat.PublicChat
|
||||||
|
import dev.inmo.tgbotapi.types.chat.User
|
||||||
|
|
||||||
suspend fun TelegramBot.promoteChatMember(
|
suspend fun TelegramBot.promoteChatMember(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
|
@ -3,8 +3,8 @@ package dev.inmo.tgbotapi.extensions.api.chat.members
|
|||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
import dev.inmo.tgbotapi.requests.chat.members.RestrictChatMember
|
import dev.inmo.tgbotapi.requests.chat.members.RestrictChatMember
|
||||||
import dev.inmo.tgbotapi.types.*
|
import dev.inmo.tgbotapi.types.*
|
||||||
import dev.inmo.tgbotapi.types.chat.ChatPermissions
|
import dev.inmo.tgbotapi.types.chat.*
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.PublicChat
|
import dev.inmo.tgbotapi.types.chat.User
|
||||||
|
|
||||||
suspend fun TelegramBot.restrictChatMember(
|
suspend fun TelegramBot.restrictChatMember(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
|
@ -3,7 +3,8 @@ package dev.inmo.tgbotapi.extensions.api.chat.members
|
|||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
import dev.inmo.tgbotapi.requests.chat.members.SetChatAdministratorCustomTitle
|
import dev.inmo.tgbotapi.requests.chat.members.SetChatAdministratorCustomTitle
|
||||||
import dev.inmo.tgbotapi.types.*
|
import dev.inmo.tgbotapi.types.*
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.PublicChat
|
import dev.inmo.tgbotapi.types.chat.PublicChat
|
||||||
|
import dev.inmo.tgbotapi.types.chat.User
|
||||||
|
|
||||||
suspend fun TelegramBot.setChatAdministratorCustomTitle(
|
suspend fun TelegramBot.setChatAdministratorCustomTitle(
|
||||||
chatId: ChatId,
|
chatId: ChatId,
|
||||||
@ -27,4 +28,4 @@ suspend fun TelegramBot.setChatAdministratorCustomTitle(
|
|||||||
chat: PublicChat,
|
chat: PublicChat,
|
||||||
user: User,
|
user: User,
|
||||||
customTitle: String
|
customTitle: String
|
||||||
) = setChatAdministratorCustomTitle(chat.id, user.id, customTitle)
|
) = setChatAdministratorCustomTitle(chat.id, user.id, customTitle)
|
||||||
|
@ -3,7 +3,8 @@ package dev.inmo.tgbotapi.extensions.api.chat.members
|
|||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
import dev.inmo.tgbotapi.requests.chat.members.UnbanChatMember
|
import dev.inmo.tgbotapi.requests.chat.members.UnbanChatMember
|
||||||
import dev.inmo.tgbotapi.types.*
|
import dev.inmo.tgbotapi.types.*
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.PublicChat
|
import dev.inmo.tgbotapi.types.chat.PublicChat
|
||||||
|
import dev.inmo.tgbotapi.types.chat.User
|
||||||
|
|
||||||
suspend fun TelegramBot.unbanChatMember(
|
suspend fun TelegramBot.unbanChatMember(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
|
@ -3,7 +3,7 @@ package dev.inmo.tgbotapi.extensions.api.chat.members
|
|||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
import dev.inmo.tgbotapi.requests.chat.members.*
|
import dev.inmo.tgbotapi.requests.chat.members.*
|
||||||
import dev.inmo.tgbotapi.types.*
|
import dev.inmo.tgbotapi.types.*
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.PublicChat
|
import dev.inmo.tgbotapi.types.chat.PublicChat
|
||||||
|
|
||||||
suspend fun TelegramBot.unbanChatSenderChat(
|
suspend fun TelegramBot.unbanChatSenderChat(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
|
@ -3,7 +3,7 @@ package dev.inmo.tgbotapi.extensions.api.chat.modify
|
|||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
import dev.inmo.tgbotapi.requests.chat.modify.DeleteChatPhoto
|
import dev.inmo.tgbotapi.requests.chat.modify.DeleteChatPhoto
|
||||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.PublicChat
|
import dev.inmo.tgbotapi.types.chat.PublicChat
|
||||||
|
|
||||||
suspend fun TelegramBot.deleteChatPhoto(
|
suspend fun TelegramBot.deleteChatPhoto(
|
||||||
chatId: ChatIdentifier
|
chatId: ChatIdentifier
|
||||||
|
@ -4,7 +4,7 @@ import dev.inmo.tgbotapi.bot.TelegramBot
|
|||||||
import dev.inmo.tgbotapi.requests.chat.modify.PinChatMessage
|
import dev.inmo.tgbotapi.requests.chat.modify.PinChatMessage
|
||||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||||
import dev.inmo.tgbotapi.types.MessageIdentifier
|
import dev.inmo.tgbotapi.types.MessageIdentifier
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.Message
|
import dev.inmo.tgbotapi.types.message.abstracts.Message
|
||||||
|
|
||||||
suspend fun TelegramBot.pinChatMessage(
|
suspend fun TelegramBot.pinChatMessage(
|
||||||
|
@ -3,7 +3,7 @@ package dev.inmo.tgbotapi.extensions.api.chat.modify
|
|||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
import dev.inmo.tgbotapi.requests.chat.modify.SetChatDescription
|
import dev.inmo.tgbotapi.requests.chat.modify.SetChatDescription
|
||||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.PublicChat
|
import dev.inmo.tgbotapi.types.chat.PublicChat
|
||||||
|
|
||||||
suspend fun TelegramBot.setChatDescription(
|
suspend fun TelegramBot.setChatDescription(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
|
@ -3,7 +3,7 @@ package dev.inmo.tgbotapi.extensions.api.chat.modify
|
|||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
import dev.inmo.tgbotapi.requests.chat.modify.*
|
import dev.inmo.tgbotapi.requests.chat.modify.*
|
||||||
import dev.inmo.tgbotapi.types.*
|
import dev.inmo.tgbotapi.types.*
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.PrivateChat
|
import dev.inmo.tgbotapi.types.chat.PrivateChat
|
||||||
|
|
||||||
suspend fun TelegramBot.setChatMenuButton(
|
suspend fun TelegramBot.setChatMenuButton(
|
||||||
chatId: ChatId,
|
chatId: ChatId,
|
||||||
|
@ -4,7 +4,7 @@ import dev.inmo.tgbotapi.bot.TelegramBot
|
|||||||
import dev.inmo.tgbotapi.requests.chat.modify.SetChatPermissions
|
import dev.inmo.tgbotapi.requests.chat.modify.SetChatPermissions
|
||||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||||
import dev.inmo.tgbotapi.types.chat.ChatPermissions
|
import dev.inmo.tgbotapi.types.chat.ChatPermissions
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.PublicChat
|
import dev.inmo.tgbotapi.types.chat.PublicChat
|
||||||
|
|
||||||
suspend fun TelegramBot.setDefaultChatMembersPermissions(
|
suspend fun TelegramBot.setDefaultChatMembersPermissions(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
|
@ -4,7 +4,7 @@ import dev.inmo.tgbotapi.bot.TelegramBot
|
|||||||
import dev.inmo.tgbotapi.requests.abstracts.MultipartFile
|
import dev.inmo.tgbotapi.requests.abstracts.MultipartFile
|
||||||
import dev.inmo.tgbotapi.requests.chat.modify.SetChatPhoto
|
import dev.inmo.tgbotapi.requests.chat.modify.SetChatPhoto
|
||||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.PublicChat
|
import dev.inmo.tgbotapi.types.chat.PublicChat
|
||||||
|
|
||||||
suspend fun TelegramBot.setChatPhoto(
|
suspend fun TelegramBot.setChatPhoto(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
|
@ -3,7 +3,7 @@ package dev.inmo.tgbotapi.extensions.api.chat.modify
|
|||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
import dev.inmo.tgbotapi.requests.chat.modify.SetChatTitle
|
import dev.inmo.tgbotapi.requests.chat.modify.SetChatTitle
|
||||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.PublicChat
|
import dev.inmo.tgbotapi.types.chat.PublicChat
|
||||||
|
|
||||||
suspend fun TelegramBot.setChatTitle(
|
suspend fun TelegramBot.setChatTitle(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
|
@ -3,7 +3,7 @@ package dev.inmo.tgbotapi.extensions.api.chat.modify
|
|||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
import dev.inmo.tgbotapi.requests.chat.modify.UnpinAllChatMessages
|
import dev.inmo.tgbotapi.requests.chat.modify.UnpinAllChatMessages
|
||||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
|
|
||||||
suspend fun TelegramBot.unpinAllChatMessages(
|
suspend fun TelegramBot.unpinAllChatMessages(
|
||||||
chatId: ChatIdentifier
|
chatId: ChatIdentifier
|
||||||
|
@ -4,7 +4,7 @@ import dev.inmo.tgbotapi.bot.TelegramBot
|
|||||||
import dev.inmo.tgbotapi.requests.chat.modify.UnpinChatMessage
|
import dev.inmo.tgbotapi.requests.chat.modify.UnpinChatMessage
|
||||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||||
import dev.inmo.tgbotapi.types.MessageIdentifier
|
import dev.inmo.tgbotapi.types.MessageIdentifier
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.Message
|
import dev.inmo.tgbotapi.types.message.abstracts.Message
|
||||||
|
|
||||||
suspend fun TelegramBot.unpinChatMessage(
|
suspend fun TelegramBot.unpinChatMessage(
|
||||||
|
@ -3,7 +3,7 @@ package dev.inmo.tgbotapi.extensions.api.chat.stickers
|
|||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
import dev.inmo.tgbotapi.requests.chat.stickers.DeleteChatStickerSet
|
import dev.inmo.tgbotapi.requests.chat.stickers.DeleteChatStickerSet
|
||||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.SupergroupChat
|
import dev.inmo.tgbotapi.types.chat.SupergroupChat
|
||||||
|
|
||||||
suspend fun TelegramBot.deleteChatStickerSet(
|
suspend fun TelegramBot.deleteChatStickerSet(
|
||||||
chatId: ChatIdentifier
|
chatId: ChatIdentifier
|
||||||
|
@ -4,7 +4,7 @@ import dev.inmo.tgbotapi.bot.TelegramBot
|
|||||||
import dev.inmo.tgbotapi.requests.chat.stickers.SetChatStickerSet
|
import dev.inmo.tgbotapi.requests.chat.stickers.SetChatStickerSet
|
||||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||||
import dev.inmo.tgbotapi.types.StickerSetName
|
import dev.inmo.tgbotapi.types.StickerSetName
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.SupergroupChat
|
import dev.inmo.tgbotapi.types.chat.SupergroupChat
|
||||||
|
|
||||||
suspend fun TelegramBot.setChatStickerSet(
|
suspend fun TelegramBot.setChatStickerSet(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
|
@ -4,7 +4,7 @@ import dev.inmo.tgbotapi.bot.TelegramBot
|
|||||||
import dev.inmo.tgbotapi.requests.edit.LiveLocation.EditChatMessageLiveLocation
|
import dev.inmo.tgbotapi.requests.edit.LiveLocation.EditChatMessageLiveLocation
|
||||||
import dev.inmo.tgbotapi.types.*
|
import dev.inmo.tgbotapi.types.*
|
||||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import dev.inmo.tgbotapi.types.location.LiveLocation
|
import dev.inmo.tgbotapi.types.location.LiveLocation
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||||
import dev.inmo.tgbotapi.types.message.content.LocationContent
|
import dev.inmo.tgbotapi.types.message.content.LocationContent
|
||||||
|
@ -5,7 +5,7 @@ import dev.inmo.tgbotapi.requests.edit.LiveLocation.StopChatMessageLiveLocation
|
|||||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||||
import dev.inmo.tgbotapi.types.MessageIdentifier
|
import dev.inmo.tgbotapi.types.MessageIdentifier
|
||||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||||
import dev.inmo.tgbotapi.types.message.content.LocationContent
|
import dev.inmo.tgbotapi.types.message.content.LocationContent
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ import dev.inmo.tgbotapi.requests.edit.ReplyMarkup.EditChatMessageReplyMarkup
|
|||||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||||
import dev.inmo.tgbotapi.types.MessageIdentifier
|
import dev.inmo.tgbotapi.types.MessageIdentifier
|
||||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.Message
|
import dev.inmo.tgbotapi.types.message.abstracts.Message
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -9,7 +9,7 @@ import dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSourcesList
|
|||||||
import dev.inmo.tgbotapi.types.MessageIdentifier
|
import dev.inmo.tgbotapi.types.MessageIdentifier
|
||||||
import dev.inmo.tgbotapi.types.ParseMode.ParseMode
|
import dev.inmo.tgbotapi.types.ParseMode.ParseMode
|
||||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||||
import dev.inmo.tgbotapi.types.message.content.abstracts.MediaContent
|
import dev.inmo.tgbotapi.types.message.content.abstracts.MediaContent
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ import dev.inmo.tgbotapi.types.ChatIdentifier
|
|||||||
import dev.inmo.tgbotapi.types.InputMedia.InputMedia
|
import dev.inmo.tgbotapi.types.InputMedia.InputMedia
|
||||||
import dev.inmo.tgbotapi.types.MessageIdentifier
|
import dev.inmo.tgbotapi.types.MessageIdentifier
|
||||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||||
import dev.inmo.tgbotapi.types.message.content.abstracts.MediaContent
|
import dev.inmo.tgbotapi.types.message.content.abstracts.MediaContent
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ import dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSourcesList
|
|||||||
import dev.inmo.tgbotapi.types.MessageIdentifier
|
import dev.inmo.tgbotapi.types.MessageIdentifier
|
||||||
import dev.inmo.tgbotapi.types.ParseMode.ParseMode
|
import dev.inmo.tgbotapi.types.ParseMode.ParseMode
|
||||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||||
import dev.inmo.tgbotapi.types.message.content.TextContent
|
import dev.inmo.tgbotapi.types.message.content.TextContent
|
||||||
|
|
||||||
|
@ -3,7 +3,8 @@ package dev.inmo.tgbotapi.extensions.api.games
|
|||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
import dev.inmo.tgbotapi.requests.games.GetGameHighScoresByChat
|
import dev.inmo.tgbotapi.requests.games.GetGameHighScoresByChat
|
||||||
import dev.inmo.tgbotapi.types.*
|
import dev.inmo.tgbotapi.types.*
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
|
import dev.inmo.tgbotapi.types.chat.CommonUser
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||||
import dev.inmo.tgbotapi.types.message.content.GameContent
|
import dev.inmo.tgbotapi.types.message.content.GameContent
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@ package dev.inmo.tgbotapi.extensions.api.games
|
|||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
import dev.inmo.tgbotapi.requests.games.GetGameHighScoresByInlineMessageId
|
import dev.inmo.tgbotapi.requests.games.GetGameHighScoresByInlineMessageId
|
||||||
import dev.inmo.tgbotapi.types.*
|
import dev.inmo.tgbotapi.types.*
|
||||||
|
import dev.inmo.tgbotapi.types.chat.CommonUser
|
||||||
|
|
||||||
suspend fun TelegramBot.getGameScore(
|
suspend fun TelegramBot.getGameScore(
|
||||||
userId: UserId,
|
userId: UserId,
|
||||||
|
@ -3,7 +3,8 @@ package dev.inmo.tgbotapi.extensions.api.games
|
|||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
import dev.inmo.tgbotapi.requests.games.SetGameScoreByChatId
|
import dev.inmo.tgbotapi.requests.games.SetGameScoreByChatId
|
||||||
import dev.inmo.tgbotapi.types.*
|
import dev.inmo.tgbotapi.types.*
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
|
import dev.inmo.tgbotapi.types.chat.CommonUser
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||||
import dev.inmo.tgbotapi.types.message.content.GameContent
|
import dev.inmo.tgbotapi.types.message.content.GameContent
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@ package dev.inmo.tgbotapi.extensions.api.games
|
|||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
import dev.inmo.tgbotapi.requests.games.SetGameScoreByInlineMessageId
|
import dev.inmo.tgbotapi.requests.games.SetGameScoreByInlineMessageId
|
||||||
import dev.inmo.tgbotapi.types.*
|
import dev.inmo.tgbotapi.types.*
|
||||||
|
import dev.inmo.tgbotapi.types.chat.CommonUser
|
||||||
|
|
||||||
suspend fun TelegramBot.setGameScore(
|
suspend fun TelegramBot.setGameScore(
|
||||||
userId: UserId,
|
userId: UserId,
|
||||||
|
@ -2,7 +2,7 @@ package dev.inmo.tgbotapi.extensions.api.get
|
|||||||
|
|
||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
import dev.inmo.tgbotapi.requests.get.GetUserProfilePhotos
|
import dev.inmo.tgbotapi.requests.get.GetUserProfilePhotos
|
||||||
import dev.inmo.tgbotapi.types.CommonUser
|
import dev.inmo.tgbotapi.types.chat.CommonUser
|
||||||
import dev.inmo.tgbotapi.types.UserId
|
import dev.inmo.tgbotapi.types.UserId
|
||||||
|
|
||||||
suspend fun TelegramBot.getUserProfilePhotos(
|
suspend fun TelegramBot.getUserProfilePhotos(
|
||||||
|
@ -2,7 +2,7 @@ package dev.inmo.tgbotapi.extensions.api.passport
|
|||||||
|
|
||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
import dev.inmo.tgbotapi.requests.SetPassportDataErrors
|
import dev.inmo.tgbotapi.requests.SetPassportDataErrors
|
||||||
import dev.inmo.tgbotapi.types.User
|
import dev.inmo.tgbotapi.types.chat.User
|
||||||
import dev.inmo.tgbotapi.types.UserId
|
import dev.inmo.tgbotapi.types.UserId
|
||||||
import dev.inmo.tgbotapi.types.message.PassportMessage
|
import dev.inmo.tgbotapi.types.message.PassportMessage
|
||||||
import dev.inmo.tgbotapi.types.passport.PassportData
|
import dev.inmo.tgbotapi.types.passport.PassportData
|
||||||
|
@ -7,7 +7,7 @@ import dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSourcesList
|
|||||||
import dev.inmo.tgbotapi.types.MessageIdentifier
|
import dev.inmo.tgbotapi.types.MessageIdentifier
|
||||||
import dev.inmo.tgbotapi.types.ParseMode.ParseMode
|
import dev.inmo.tgbotapi.types.ParseMode.ParseMode
|
||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.Message
|
import dev.inmo.tgbotapi.types.message.abstracts.Message
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -7,7 +7,7 @@ import dev.inmo.tgbotapi.types.InputMedia.*
|
|||||||
import dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSourcesList
|
import dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSourcesList
|
||||||
import dev.inmo.tgbotapi.types.MessageIdentifier
|
import dev.inmo.tgbotapi.types.MessageIdentifier
|
||||||
import dev.inmo.tgbotapi.types.ParseMode.ParseMode
|
import dev.inmo.tgbotapi.types.ParseMode.ParseMode
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.MediaGroupMessage
|
import dev.inmo.tgbotapi.types.message.abstracts.MediaGroupMessage
|
||||||
import dev.inmo.tgbotapi.types.message.content.media.MediaGroupContent
|
import dev.inmo.tgbotapi.types.message.content.media.MediaGroupContent
|
||||||
import dev.inmo.tgbotapi.types.update.MediaGroupUpdates.SentMediaGroupUpdate
|
import dev.inmo.tgbotapi.types.update.MediaGroupUpdates.SentMediaGroupUpdate
|
||||||
|
@ -15,7 +15,7 @@ import dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSourcesList
|
|||||||
import dev.inmo.tgbotapi.types.ParseMode.ParseMode
|
import dev.inmo.tgbotapi.types.ParseMode.ParseMode
|
||||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import dev.inmo.tgbotapi.types.dice.DiceAnimationType
|
import dev.inmo.tgbotapi.types.dice.DiceAnimationType
|
||||||
import dev.inmo.tgbotapi.types.files.*
|
import dev.inmo.tgbotapi.types.files.*
|
||||||
import dev.inmo.tgbotapi.types.files.TelegramMediaFile
|
import dev.inmo.tgbotapi.types.files.TelegramMediaFile
|
||||||
|
@ -4,7 +4,7 @@ import dev.inmo.tgbotapi.bot.TelegramBot
|
|||||||
import dev.inmo.tgbotapi.requests.send.SendAction
|
import dev.inmo.tgbotapi.requests.send.SendAction
|
||||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||||
import dev.inmo.tgbotapi.types.actions.*
|
import dev.inmo.tgbotapi.types.actions.*
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
|
|
||||||
suspend fun TelegramBot.sendBotAction(
|
suspend fun TelegramBot.sendBotAction(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
|
@ -6,7 +6,7 @@ import dev.inmo.tgbotapi.bot.TelegramBot
|
|||||||
import dev.inmo.tgbotapi.requests.send.SendAction
|
import dev.inmo.tgbotapi.requests.send.SendAction
|
||||||
import dev.inmo.tgbotapi.types.*
|
import dev.inmo.tgbotapi.types.*
|
||||||
import dev.inmo.tgbotapi.types.actions.*
|
import dev.inmo.tgbotapi.types.actions.*
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import kotlinx.coroutines.*
|
import kotlinx.coroutines.*
|
||||||
import kotlin.contracts.*
|
import kotlin.contracts.*
|
||||||
import kotlin.coroutines.coroutineContext
|
import kotlin.coroutines.coroutineContext
|
||||||
|
@ -4,7 +4,7 @@ import dev.inmo.tgbotapi.bot.TelegramBot
|
|||||||
import dev.inmo.tgbotapi.requests.send.SendContact
|
import dev.inmo.tgbotapi.requests.send.SendContact
|
||||||
import dev.inmo.tgbotapi.types.*
|
import dev.inmo.tgbotapi.types.*
|
||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||||
|
@ -5,7 +5,7 @@ import dev.inmo.tgbotapi.requests.send.SendDice
|
|||||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||||
import dev.inmo.tgbotapi.types.MessageIdentifier
|
import dev.inmo.tgbotapi.types.MessageIdentifier
|
||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import dev.inmo.tgbotapi.types.dice.DiceAnimationType
|
import dev.inmo.tgbotapi.types.dice.DiceAnimationType
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -5,7 +5,7 @@ import dev.inmo.tgbotapi.requests.send.SendStaticLocation
|
|||||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||||
import dev.inmo.tgbotapi.types.MessageIdentifier
|
import dev.inmo.tgbotapi.types.MessageIdentifier
|
||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import dev.inmo.tgbotapi.types.location.StaticLocation
|
import dev.inmo.tgbotapi.types.location.StaticLocation
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -7,7 +7,7 @@ import dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSourcesList
|
|||||||
import dev.inmo.tgbotapi.types.MessageIdentifier
|
import dev.inmo.tgbotapi.types.MessageIdentifier
|
||||||
import dev.inmo.tgbotapi.types.ParseMode.ParseMode
|
import dev.inmo.tgbotapi.types.ParseMode.ParseMode
|
||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||||
|
@ -4,7 +4,7 @@ import dev.inmo.tgbotapi.bot.TelegramBot
|
|||||||
import dev.inmo.tgbotapi.requests.send.SendVenue
|
import dev.inmo.tgbotapi.requests.send.SendVenue
|
||||||
import dev.inmo.tgbotapi.types.*
|
import dev.inmo.tgbotapi.types.*
|
||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import dev.inmo.tgbotapi.types.location.StaticLocation
|
import dev.inmo.tgbotapi.types.location.StaticLocation
|
||||||
import dev.inmo.tgbotapi.types.venue.Venue
|
import dev.inmo.tgbotapi.types.venue.Venue
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ import dev.inmo.tgbotapi.requests.send.games.SendGame
|
|||||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||||
import dev.inmo.tgbotapi.types.MessageIdentifier
|
import dev.inmo.tgbotapi.types.MessageIdentifier
|
||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import dev.inmo.tgbotapi.types.games.Game
|
import dev.inmo.tgbotapi.types.games.Game
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -8,7 +8,7 @@ import dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSourcesList
|
|||||||
import dev.inmo.tgbotapi.types.MessageIdentifier
|
import dev.inmo.tgbotapi.types.MessageIdentifier
|
||||||
import dev.inmo.tgbotapi.types.ParseMode.ParseMode
|
import dev.inmo.tgbotapi.types.ParseMode.ParseMode
|
||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import dev.inmo.tgbotapi.types.files.AnimationFile
|
import dev.inmo.tgbotapi.types.files.AnimationFile
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -8,7 +8,7 @@ import dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSourcesList
|
|||||||
import dev.inmo.tgbotapi.types.MessageIdentifier
|
import dev.inmo.tgbotapi.types.MessageIdentifier
|
||||||
import dev.inmo.tgbotapi.types.ParseMode.ParseMode
|
import dev.inmo.tgbotapi.types.ParseMode.ParseMode
|
||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import dev.inmo.tgbotapi.types.files.AudioFile
|
import dev.inmo.tgbotapi.types.files.AudioFile
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -8,7 +8,7 @@ import dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSourcesList
|
|||||||
import dev.inmo.tgbotapi.types.MessageIdentifier
|
import dev.inmo.tgbotapi.types.MessageIdentifier
|
||||||
import dev.inmo.tgbotapi.types.ParseMode.ParseMode
|
import dev.inmo.tgbotapi.types.ParseMode.ParseMode
|
||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import dev.inmo.tgbotapi.types.files.DocumentFile
|
import dev.inmo.tgbotapi.types.files.DocumentFile
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -5,7 +5,7 @@ import dev.inmo.tgbotapi.requests.send.media.*
|
|||||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||||
import dev.inmo.tgbotapi.types.InputMedia.*
|
import dev.inmo.tgbotapi.types.InputMedia.*
|
||||||
import dev.inmo.tgbotapi.types.MessageIdentifier
|
import dev.inmo.tgbotapi.types.MessageIdentifier
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import dev.inmo.tgbotapi.types.message.content.media.MediaGroupContent
|
import dev.inmo.tgbotapi.types.message.content.media.MediaGroupContent
|
||||||
import dev.inmo.tgbotapi.types.message.content.media.VisualMediaGroupContent
|
import dev.inmo.tgbotapi.types.message.content.media.VisualMediaGroupContent
|
||||||
import dev.inmo.tgbotapi.types.message.content.media.AudioContent
|
import dev.inmo.tgbotapi.types.message.content.media.AudioContent
|
||||||
|
@ -8,7 +8,7 @@ import dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSourcesList
|
|||||||
import dev.inmo.tgbotapi.types.MessageIdentifier
|
import dev.inmo.tgbotapi.types.MessageIdentifier
|
||||||
import dev.inmo.tgbotapi.types.ParseMode.ParseMode
|
import dev.inmo.tgbotapi.types.ParseMode.ParseMode
|
||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import dev.inmo.tgbotapi.types.files.*
|
import dev.inmo.tgbotapi.types.files.*
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -6,7 +6,7 @@ import dev.inmo.tgbotapi.requests.send.media.SendSticker
|
|||||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||||
import dev.inmo.tgbotapi.types.MessageIdentifier
|
import dev.inmo.tgbotapi.types.MessageIdentifier
|
||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import dev.inmo.tgbotapi.types.files.Sticker
|
import dev.inmo.tgbotapi.types.files.Sticker
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -8,7 +8,7 @@ import dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSourcesList
|
|||||||
import dev.inmo.tgbotapi.types.MessageIdentifier
|
import dev.inmo.tgbotapi.types.MessageIdentifier
|
||||||
import dev.inmo.tgbotapi.types.ParseMode.ParseMode
|
import dev.inmo.tgbotapi.types.ParseMode.ParseMode
|
||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import dev.inmo.tgbotapi.types.files.VideoFile
|
import dev.inmo.tgbotapi.types.files.VideoFile
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -6,7 +6,7 @@ import dev.inmo.tgbotapi.requests.send.media.SendVideoNote
|
|||||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||||
import dev.inmo.tgbotapi.types.MessageIdentifier
|
import dev.inmo.tgbotapi.types.MessageIdentifier
|
||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import dev.inmo.tgbotapi.types.files.VideoNoteFile
|
import dev.inmo.tgbotapi.types.files.VideoNoteFile
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -7,9 +7,8 @@ import dev.inmo.tgbotapi.types.ChatIdentifier
|
|||||||
import dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSourcesList
|
import dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSourcesList
|
||||||
import dev.inmo.tgbotapi.types.MessageIdentifier
|
import dev.inmo.tgbotapi.types.MessageIdentifier
|
||||||
import dev.inmo.tgbotapi.types.ParseMode.ParseMode
|
import dev.inmo.tgbotapi.types.ParseMode.ParseMode
|
||||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
|
||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import dev.inmo.tgbotapi.types.files.VoiceFile
|
import dev.inmo.tgbotapi.types.files.VoiceFile
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -4,6 +4,7 @@ import dev.inmo.tgbotapi.bot.TelegramBot
|
|||||||
import dev.inmo.tgbotapi.requests.send.payments.SendInvoice
|
import dev.inmo.tgbotapi.requests.send.payments.SendInvoice
|
||||||
import dev.inmo.tgbotapi.types.*
|
import dev.inmo.tgbotapi.types.*
|
||||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||||
|
import dev.inmo.tgbotapi.types.chat.CommonUser
|
||||||
import dev.inmo.tgbotapi.types.payments.LabeledPrice
|
import dev.inmo.tgbotapi.types.payments.LabeledPrice
|
||||||
import dev.inmo.tgbotapi.types.payments.abstracts.Currency
|
import dev.inmo.tgbotapi.types.payments.abstracts.Currency
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ import dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSourcesList
|
|||||||
import dev.inmo.tgbotapi.types.MessageIdentifier
|
import dev.inmo.tgbotapi.types.MessageIdentifier
|
||||||
import dev.inmo.tgbotapi.types.ParseMode.ParseMode
|
import dev.inmo.tgbotapi.types.ParseMode.ParseMode
|
||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import dev.inmo.tgbotapi.types.polls.*
|
import dev.inmo.tgbotapi.types.polls.*
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -4,7 +4,7 @@ import dev.inmo.tgbotapi.bot.TelegramBot
|
|||||||
import dev.inmo.tgbotapi.requests.abstracts.FileId
|
import dev.inmo.tgbotapi.requests.abstracts.FileId
|
||||||
import dev.inmo.tgbotapi.requests.abstracts.MultipartFile
|
import dev.inmo.tgbotapi.requests.abstracts.MultipartFile
|
||||||
import dev.inmo.tgbotapi.requests.stickers.AddAnimatedStickerToSet
|
import dev.inmo.tgbotapi.requests.stickers.AddAnimatedStickerToSet
|
||||||
import dev.inmo.tgbotapi.types.CommonUser
|
import dev.inmo.tgbotapi.types.chat.CommonUser
|
||||||
import dev.inmo.tgbotapi.types.UserId
|
import dev.inmo.tgbotapi.types.UserId
|
||||||
import dev.inmo.tgbotapi.types.stickers.MaskPosition
|
import dev.inmo.tgbotapi.types.stickers.MaskPosition
|
||||||
import dev.inmo.tgbotapi.types.stickers.StickerSet
|
import dev.inmo.tgbotapi.types.stickers.StickerSet
|
||||||
|
@ -4,7 +4,7 @@ import dev.inmo.tgbotapi.bot.TelegramBot
|
|||||||
import dev.inmo.tgbotapi.requests.abstracts.FileId
|
import dev.inmo.tgbotapi.requests.abstracts.FileId
|
||||||
import dev.inmo.tgbotapi.requests.abstracts.MultipartFile
|
import dev.inmo.tgbotapi.requests.abstracts.MultipartFile
|
||||||
import dev.inmo.tgbotapi.requests.stickers.AddStaticStickerToSet
|
import dev.inmo.tgbotapi.requests.stickers.AddStaticStickerToSet
|
||||||
import dev.inmo.tgbotapi.types.CommonUser
|
import dev.inmo.tgbotapi.types.chat.CommonUser
|
||||||
import dev.inmo.tgbotapi.types.UserId
|
import dev.inmo.tgbotapi.types.UserId
|
||||||
import dev.inmo.tgbotapi.types.stickers.MaskPosition
|
import dev.inmo.tgbotapi.types.stickers.MaskPosition
|
||||||
import dev.inmo.tgbotapi.types.stickers.StickerSet
|
import dev.inmo.tgbotapi.types.stickers.StickerSet
|
||||||
|
@ -4,7 +4,7 @@ import dev.inmo.tgbotapi.bot.TelegramBot
|
|||||||
import dev.inmo.tgbotapi.requests.abstracts.FileId
|
import dev.inmo.tgbotapi.requests.abstracts.FileId
|
||||||
import dev.inmo.tgbotapi.requests.abstracts.MultipartFile
|
import dev.inmo.tgbotapi.requests.abstracts.MultipartFile
|
||||||
import dev.inmo.tgbotapi.requests.stickers.AddVideoStickerToSet
|
import dev.inmo.tgbotapi.requests.stickers.AddVideoStickerToSet
|
||||||
import dev.inmo.tgbotapi.types.CommonUser
|
import dev.inmo.tgbotapi.types.chat.CommonUser
|
||||||
import dev.inmo.tgbotapi.types.UserId
|
import dev.inmo.tgbotapi.types.UserId
|
||||||
import dev.inmo.tgbotapi.types.stickers.MaskPosition
|
import dev.inmo.tgbotapi.types.stickers.MaskPosition
|
||||||
import dev.inmo.tgbotapi.types.stickers.StickerSet
|
import dev.inmo.tgbotapi.types.stickers.StickerSet
|
||||||
|
@ -4,7 +4,7 @@ import dev.inmo.tgbotapi.bot.TelegramBot
|
|||||||
import dev.inmo.tgbotapi.requests.abstracts.FileId
|
import dev.inmo.tgbotapi.requests.abstracts.FileId
|
||||||
import dev.inmo.tgbotapi.requests.abstracts.MultipartFile
|
import dev.inmo.tgbotapi.requests.abstracts.MultipartFile
|
||||||
import dev.inmo.tgbotapi.requests.stickers.CreateNewAnimatedStickerSet
|
import dev.inmo.tgbotapi.requests.stickers.CreateNewAnimatedStickerSet
|
||||||
import dev.inmo.tgbotapi.types.CommonUser
|
import dev.inmo.tgbotapi.types.chat.CommonUser
|
||||||
import dev.inmo.tgbotapi.types.UserId
|
import dev.inmo.tgbotapi.types.UserId
|
||||||
import dev.inmo.tgbotapi.types.stickers.MaskPosition
|
import dev.inmo.tgbotapi.types.stickers.MaskPosition
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ import dev.inmo.tgbotapi.bot.TelegramBot
|
|||||||
import dev.inmo.tgbotapi.requests.abstracts.FileId
|
import dev.inmo.tgbotapi.requests.abstracts.FileId
|
||||||
import dev.inmo.tgbotapi.requests.abstracts.MultipartFile
|
import dev.inmo.tgbotapi.requests.abstracts.MultipartFile
|
||||||
import dev.inmo.tgbotapi.requests.stickers.CreateNewStaticStickerSet
|
import dev.inmo.tgbotapi.requests.stickers.CreateNewStaticStickerSet
|
||||||
import dev.inmo.tgbotapi.types.CommonUser
|
import dev.inmo.tgbotapi.types.chat.CommonUser
|
||||||
import dev.inmo.tgbotapi.types.UserId
|
import dev.inmo.tgbotapi.types.UserId
|
||||||
import dev.inmo.tgbotapi.types.stickers.MaskPosition
|
import dev.inmo.tgbotapi.types.stickers.MaskPosition
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ import dev.inmo.tgbotapi.bot.TelegramBot
|
|||||||
import dev.inmo.tgbotapi.requests.abstracts.FileId
|
import dev.inmo.tgbotapi.requests.abstracts.FileId
|
||||||
import dev.inmo.tgbotapi.requests.abstracts.MultipartFile
|
import dev.inmo.tgbotapi.requests.abstracts.MultipartFile
|
||||||
import dev.inmo.tgbotapi.requests.stickers.CreateNewVideoStickerSet
|
import dev.inmo.tgbotapi.requests.stickers.CreateNewVideoStickerSet
|
||||||
import dev.inmo.tgbotapi.types.CommonUser
|
import dev.inmo.tgbotapi.types.chat.CommonUser
|
||||||
import dev.inmo.tgbotapi.types.UserId
|
import dev.inmo.tgbotapi.types.UserId
|
||||||
import dev.inmo.tgbotapi.types.stickers.MaskPosition
|
import dev.inmo.tgbotapi.types.stickers.MaskPosition
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ import dev.inmo.tgbotapi.bot.TelegramBot
|
|||||||
import dev.inmo.tgbotapi.requests.abstracts.FileId
|
import dev.inmo.tgbotapi.requests.abstracts.FileId
|
||||||
import dev.inmo.tgbotapi.requests.abstracts.MultipartFile
|
import dev.inmo.tgbotapi.requests.abstracts.MultipartFile
|
||||||
import dev.inmo.tgbotapi.requests.stickers.SetStickerSetThumb
|
import dev.inmo.tgbotapi.requests.stickers.SetStickerSetThumb
|
||||||
import dev.inmo.tgbotapi.types.CommonUser
|
import dev.inmo.tgbotapi.types.chat.CommonUser
|
||||||
import dev.inmo.tgbotapi.types.UserId
|
import dev.inmo.tgbotapi.types.UserId
|
||||||
import dev.inmo.tgbotapi.types.stickers.StickerSet
|
import dev.inmo.tgbotapi.types.stickers.StickerSet
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ package dev.inmo.tgbotapi.extensions.api.stickers
|
|||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
import dev.inmo.tgbotapi.requests.abstracts.MultipartFile
|
import dev.inmo.tgbotapi.requests.abstracts.MultipartFile
|
||||||
import dev.inmo.tgbotapi.requests.stickers.UploadStickerFile
|
import dev.inmo.tgbotapi.requests.stickers.UploadStickerFile
|
||||||
import dev.inmo.tgbotapi.types.CommonUser
|
import dev.inmo.tgbotapi.types.chat.CommonUser
|
||||||
import dev.inmo.tgbotapi.types.UserId
|
import dev.inmo.tgbotapi.types.UserId
|
||||||
|
|
||||||
suspend fun TelegramBot.uploadStickerFile(
|
suspend fun TelegramBot.uploadStickerFile(
|
||||||
|
@ -4,9 +4,7 @@ import dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContext
|
|||||||
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.SimpleFilter
|
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.SimpleFilter
|
||||||
import dev.inmo.tgbotapi.extensions.utils.*
|
import dev.inmo.tgbotapi.extensions.utils.*
|
||||||
import dev.inmo.tgbotapi.requests.abstracts.Request
|
import dev.inmo.tgbotapi.requests.abstracts.Request
|
||||||
import dev.inmo.tgbotapi.types.ChatJoinRequest
|
import dev.inmo.tgbotapi.types.chat.ChatJoinRequest
|
||||||
import dev.inmo.tgbotapi.types.payments.PreCheckoutQuery
|
|
||||||
import dev.inmo.tgbotapi.types.payments.ShippingQuery
|
|
||||||
import kotlinx.coroutines.flow.toList
|
import kotlinx.coroutines.flow.toList
|
||||||
|
|
||||||
typealias ChatJoinRequestsMapper = suspend ChatJoinRequest.() -> ChatJoinRequest?
|
typealias ChatJoinRequestsMapper = suspend ChatJoinRequest.() -> ChatJoinRequest?
|
||||||
|
@ -3,7 +3,7 @@ package dev.inmo.tgbotapi.extensions.behaviour_builder.expectations
|
|||||||
import dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContext
|
import dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContext
|
||||||
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.SimpleFilter
|
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.SimpleFilter
|
||||||
import dev.inmo.tgbotapi.requests.abstracts.Request
|
import dev.inmo.tgbotapi.requests.abstracts.Request
|
||||||
import dev.inmo.tgbotapi.types.ChatMemberUpdated
|
import dev.inmo.tgbotapi.types.chat.member.ChatMemberUpdated
|
||||||
import dev.inmo.tgbotapi.types.update.CommonChatMemberUpdatedUpdate
|
import dev.inmo.tgbotapi.types.update.CommonChatMemberUpdatedUpdate
|
||||||
import dev.inmo.tgbotapi.types.update.MyChatMemberUpdatedUpdate
|
import dev.inmo.tgbotapi.types.update.MyChatMemberUpdatedUpdate
|
||||||
import dev.inmo.tgbotapi.types.update.abstracts.ChatMemberUpdatedUpdate
|
import dev.inmo.tgbotapi.types.update.abstracts.ChatMemberUpdatedUpdate
|
||||||
|
@ -3,8 +3,8 @@ package dev.inmo.tgbotapi.extensions.behaviour_builder.filters
|
|||||||
import dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContextAndTwoTypesReceiver
|
import dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContextAndTwoTypesReceiver
|
||||||
import dev.inmo.tgbotapi.extensions.utils.extensions.sourceChat
|
import dev.inmo.tgbotapi.extensions.utils.extensions.sourceChat
|
||||||
import dev.inmo.tgbotapi.types.queries.callback.CallbackQuery
|
import dev.inmo.tgbotapi.types.queries.callback.CallbackQuery
|
||||||
import dev.inmo.tgbotapi.types.ChatJoinRequest
|
import dev.inmo.tgbotapi.types.chat.ChatJoinRequest
|
||||||
import dev.inmo.tgbotapi.types.ChatMemberUpdated
|
import dev.inmo.tgbotapi.types.chat.member.ChatMemberUpdated
|
||||||
import dev.inmo.tgbotapi.types.InlineQueries.query.InlineQuery
|
import dev.inmo.tgbotapi.types.InlineQueries.query.InlineQuery
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.Message
|
import dev.inmo.tgbotapi.types.message.abstracts.Message
|
||||||
import dev.inmo.tgbotapi.types.payments.PreCheckoutQuery
|
import dev.inmo.tgbotapi.types.payments.PreCheckoutQuery
|
||||||
|
@ -5,9 +5,7 @@ import dev.inmo.tgbotapi.extensions.behaviour_builder.filters.*
|
|||||||
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.SimpleFilter
|
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.SimpleFilter
|
||||||
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.*
|
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.*
|
||||||
import dev.inmo.tgbotapi.extensions.utils.asChatJoinRequestUpdate
|
import dev.inmo.tgbotapi.extensions.utils.asChatJoinRequestUpdate
|
||||||
import dev.inmo.tgbotapi.extensions.utils.asShippingQueryUpdate
|
import dev.inmo.tgbotapi.types.chat.ChatJoinRequest
|
||||||
import dev.inmo.tgbotapi.types.ChatJoinRequest
|
|
||||||
import dev.inmo.tgbotapi.types.payments.ShippingQuery
|
|
||||||
import dev.inmo.tgbotapi.types.update.abstracts.Update
|
import dev.inmo.tgbotapi.types.update.abstracts.Update
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -7,7 +7,7 @@ import dev.inmo.tgbotapi.extensions.behaviour_builder.filters.ChatMemberUpdatedF
|
|||||||
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.SimpleFilter
|
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.SimpleFilter
|
||||||
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.ByChatChatMemberUpdatedMarkerFactory
|
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.ByChatChatMemberUpdatedMarkerFactory
|
||||||
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.MarkerFactory
|
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.MarkerFactory
|
||||||
import dev.inmo.tgbotapi.types.ChatMemberUpdated
|
import dev.inmo.tgbotapi.types.chat.member.ChatMemberUpdated
|
||||||
import dev.inmo.tgbotapi.types.update.CommonChatMemberUpdatedUpdate
|
import dev.inmo.tgbotapi.types.update.CommonChatMemberUpdatedUpdate
|
||||||
import dev.inmo.tgbotapi.types.update.MyChatMemberUpdatedUpdate
|
import dev.inmo.tgbotapi.types.update.MyChatMemberUpdatedUpdate
|
||||||
import dev.inmo.tgbotapi.types.update.abstracts.ChatMemberUpdatedUpdate
|
import dev.inmo.tgbotapi.types.update.abstracts.ChatMemberUpdatedUpdate
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories
|
package dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories
|
||||||
|
|
||||||
import dev.inmo.tgbotapi.types.ChatMemberUpdated
|
import dev.inmo.tgbotapi.types.chat.member.ChatMemberUpdated
|
||||||
|
|
||||||
object ByChatChatMemberUpdatedMarkerFactory : MarkerFactory<ChatMemberUpdated, Any> {
|
object ByChatChatMemberUpdatedMarkerFactory : MarkerFactory<ChatMemberUpdated, Any> {
|
||||||
override suspend fun invoke(data: ChatMemberUpdated) = data.chat
|
override suspend fun invoke(data: ChatMemberUpdated) = data.chat
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories
|
package dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories
|
||||||
|
|
||||||
import dev.inmo.tgbotapi.types.queries.callback.CallbackQuery
|
import dev.inmo.tgbotapi.types.queries.callback.CallbackQuery
|
||||||
import dev.inmo.tgbotapi.types.ChatJoinRequest
|
import dev.inmo.tgbotapi.types.chat.ChatJoinRequest
|
||||||
import dev.inmo.tgbotapi.types.payments.PreCheckoutQuery
|
import dev.inmo.tgbotapi.types.payments.PreCheckoutQuery
|
||||||
import dev.inmo.tgbotapi.types.payments.ShippingQuery
|
import dev.inmo.tgbotapi.types.payments.ShippingQuery
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package dev.inmo.tgbotapi.CommonAbstracts
|
package dev.inmo.tgbotapi.CommonAbstracts
|
||||||
|
|
||||||
import dev.inmo.tgbotapi.types.User
|
import dev.inmo.tgbotapi.types.chat.User
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Inheritors of this interface have some [User] as a source of data. For example, any [dev.inmo.tgbotapi.types.queries.callback.CallbackQuery]
|
* Inheritors of this interface have some [User] as a source of data. For example, any [dev.inmo.tgbotapi.types.queries.callback.CallbackQuery]
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package dev.inmo.tgbotapi.CommonAbstracts
|
package dev.inmo.tgbotapi.CommonAbstracts
|
||||||
|
|
||||||
import dev.inmo.tgbotapi.types.User
|
import dev.inmo.tgbotapi.types.chat.User
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* All inheritors of this type have [User] in their data as one of the main data
|
* All inheritors of this type have [User] in their data as one of the main data
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package dev.inmo.tgbotapi.requests.bot
|
package dev.inmo.tgbotapi.requests.bot
|
||||||
|
|
||||||
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
|
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
|
||||||
import dev.inmo.tgbotapi.types.ExtendedBot
|
import dev.inmo.tgbotapi.types.chat.ExtendedBot
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.*
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
|
@ -4,7 +4,7 @@ import dev.inmo.tgbotapi.CommonAbstracts.types.ChatRequest
|
|||||||
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
|
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
|
||||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||||
import dev.inmo.tgbotapi.types.chat.ExtendedChatSerializer
|
import dev.inmo.tgbotapi.types.chat.ExtendedChatSerializer
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.extended.ExtendedChat
|
import dev.inmo.tgbotapi.types.chat.ExtendedChat
|
||||||
import dev.inmo.tgbotapi.types.chatIdField
|
import dev.inmo.tgbotapi.types.chatIdField
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.*
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package dev.inmo.tgbotapi.types
|
package dev.inmo.tgbotapi.types
|
||||||
|
|
||||||
import dev.inmo.micro_utils.common.Warning
|
import dev.inmo.micro_utils.common.Warning
|
||||||
|
import dev.inmo.tgbotapi.types.chat.User
|
||||||
import dev.inmo.tgbotapi.utils.RiskFeature
|
import dev.inmo.tgbotapi.utils.RiskFeature
|
||||||
import kotlinx.serialization.KSerializer
|
import kotlinx.serialization.KSerializer
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
|
@ -2,6 +2,7 @@ package dev.inmo.tgbotapi.types
|
|||||||
|
|
||||||
import com.soywiz.klock.DateTime
|
import com.soywiz.klock.DateTime
|
||||||
import dev.inmo.tgbotapi.CommonAbstracts.WithUser
|
import dev.inmo.tgbotapi.CommonAbstracts.WithUser
|
||||||
|
import dev.inmo.tgbotapi.types.chat.User
|
||||||
import dev.inmo.tgbotapi.utils.RiskFeature
|
import dev.inmo.tgbotapi.utils.RiskFeature
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.*
|
||||||
import kotlinx.serialization.descriptors.SerialDescriptor
|
import kotlinx.serialization.descriptors.SerialDescriptor
|
||||||
|
@ -8,7 +8,7 @@ import kotlinx.serialization.Serializable
|
|||||||
* Represents a location to which a chat is connected.
|
* Represents a location to which a chat is connected.
|
||||||
*
|
*
|
||||||
* @see dev.inmo.tgbotapi.requests.chat.get.GetChat
|
* @see dev.inmo.tgbotapi.requests.chat.get.GetChat
|
||||||
* @see dev.inmo.tgbotapi.types.chat.abstracts.extended.ExtendedSupergroupChat
|
* @see dev.inmo.tgbotapi.types.chat.ExtendedSupergroupChat
|
||||||
*/
|
*/
|
||||||
@Serializable
|
@Serializable
|
||||||
data class ChatLocation(
|
data class ChatLocation(
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package dev.inmo.tgbotapi.types.InlineQueries.ChosenInlineResult
|
package dev.inmo.tgbotapi.types.InlineQueries.ChosenInlineResult
|
||||||
|
|
||||||
import dev.inmo.tgbotapi.types.*
|
import dev.inmo.tgbotapi.types.*
|
||||||
|
import dev.inmo.tgbotapi.types.chat.User
|
||||||
import kotlinx.serialization.SerialName
|
import kotlinx.serialization.SerialName
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package dev.inmo.tgbotapi.types.InlineQueries.ChosenInlineResult
|
package dev.inmo.tgbotapi.types.InlineQueries.ChosenInlineResult
|
||||||
|
|
||||||
import dev.inmo.tgbotapi.types.*
|
import dev.inmo.tgbotapi.types.*
|
||||||
|
import dev.inmo.tgbotapi.types.chat.User
|
||||||
import dev.inmo.tgbotapi.types.location.StaticLocation
|
import dev.inmo.tgbotapi.types.location.StaticLocation
|
||||||
import kotlinx.serialization.SerialName
|
import kotlinx.serialization.SerialName
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package dev.inmo.tgbotapi.types.InlineQueries.ChosenInlineResult
|
package dev.inmo.tgbotapi.types.InlineQueries.ChosenInlineResult
|
||||||
|
|
||||||
import dev.inmo.tgbotapi.types.*
|
import dev.inmo.tgbotapi.types.*
|
||||||
|
import dev.inmo.tgbotapi.types.chat.User
|
||||||
import dev.inmo.tgbotapi.types.location.StaticLocation
|
import dev.inmo.tgbotapi.types.location.StaticLocation
|
||||||
import kotlinx.serialization.SerialName
|
import kotlinx.serialization.SerialName
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package dev.inmo.tgbotapi.types.InlineQueries.query
|
package dev.inmo.tgbotapi.types.InlineQueries.query
|
||||||
|
|
||||||
import dev.inmo.tgbotapi.types.InlineQueryIdentifier
|
import dev.inmo.tgbotapi.types.InlineQueryIdentifier
|
||||||
import dev.inmo.tgbotapi.types.User
|
import dev.inmo.tgbotapi.types.chat.User
|
||||||
import dev.inmo.tgbotapi.types.chat.ChatType
|
import dev.inmo.tgbotapi.types.chat.ChatType
|
||||||
|
|
||||||
data class BaseInlineQuery(
|
data class BaseInlineQuery(
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package dev.inmo.tgbotapi.types.InlineQueries.query
|
package dev.inmo.tgbotapi.types.InlineQueries.query
|
||||||
|
|
||||||
import dev.inmo.tgbotapi.types.InlineQueryIdentifier
|
import dev.inmo.tgbotapi.types.InlineQueryIdentifier
|
||||||
import dev.inmo.tgbotapi.types.User
|
import dev.inmo.tgbotapi.types.chat.User
|
||||||
import dev.inmo.tgbotapi.types.chat.ChatType
|
import dev.inmo.tgbotapi.types.chat.ChatType
|
||||||
import dev.inmo.tgbotapi.types.location.Location
|
import dev.inmo.tgbotapi.types.location.Location
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package dev.inmo.tgbotapi.types.InlineQueries.query
|
package dev.inmo.tgbotapi.types.InlineQueries.query
|
||||||
|
|
||||||
import dev.inmo.tgbotapi.types.*
|
import dev.inmo.tgbotapi.types.*
|
||||||
import dev.inmo.tgbotapi.types.chat.ChatType
|
import dev.inmo.tgbotapi.types.chat.*
|
||||||
import dev.inmo.tgbotapi.types.chat.ChatTypeSerializer
|
import dev.inmo.tgbotapi.types.chat.User
|
||||||
import dev.inmo.tgbotapi.types.location.Location
|
import dev.inmo.tgbotapi.types.location.Location
|
||||||
import kotlinx.serialization.SerialName
|
import kotlinx.serialization.SerialName
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package dev.inmo.tgbotapi.types.MessageEntity
|
package dev.inmo.tgbotapi.types.MessageEntity
|
||||||
|
|
||||||
import dev.inmo.tgbotapi.types.MessageEntity.textsources.*
|
import dev.inmo.tgbotapi.types.MessageEntity.textsources.*
|
||||||
import dev.inmo.tgbotapi.types.User
|
import dev.inmo.tgbotapi.types.chat.User
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
package dev.inmo.tgbotapi.types.MessageEntity.textsources
|
package dev.inmo.tgbotapi.types.MessageEntity.textsources
|
||||||
|
|
||||||
import dev.inmo.tgbotapi.types.*
|
import dev.inmo.tgbotapi.types.*
|
||||||
|
import dev.inmo.tgbotapi.types.chat.CommonUser
|
||||||
|
import dev.inmo.tgbotapi.types.chat.User
|
||||||
import dev.inmo.tgbotapi.utils.RiskFeature
|
import dev.inmo.tgbotapi.utils.RiskFeature
|
||||||
import dev.inmo.tgbotapi.utils.extensions.makeString
|
import dev.inmo.tgbotapi.utils.extensions.makeString
|
||||||
import dev.inmo.tgbotapi.utils.internal.*
|
import dev.inmo.tgbotapi.utils.internal.*
|
||||||
|
@ -1,121 +1,22 @@
|
|||||||
package dev.inmo.tgbotapi.types
|
package dev.inmo.tgbotapi.types
|
||||||
|
|
||||||
import dev.inmo.micro_utils.language_codes.IetfLanguageCode
|
@Deprecated("Replaced", ReplaceWith("User", "dev.inmo.tgbotapi.types.chat.User"))
|
||||||
import dev.inmo.micro_utils.language_codes.IetfLanguageCodeSerializer
|
typealias User = dev.inmo.tgbotapi.types.chat.User
|
||||||
import dev.inmo.tgbotapi.types.abstracts.WithOptionalLanguageCode
|
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.PrivateChat
|
|
||||||
import dev.inmo.tgbotapi.types.chat.extended.ExtendedPrivateChatImpl
|
|
||||||
import dev.inmo.tgbotapi.utils.*
|
|
||||||
import kotlinx.serialization.*
|
|
||||||
import kotlinx.serialization.descriptors.SerialDescriptor
|
|
||||||
import kotlinx.serialization.encoding.Decoder
|
|
||||||
import kotlinx.serialization.encoding.Encoder
|
|
||||||
import kotlinx.serialization.json.*
|
|
||||||
|
|
||||||
@Serializable(UserSerializer::class)
|
@Deprecated("Replaced", ReplaceWith("CommonUser", "dev.inmo.tgbotapi.types.chat.CommonUser"))
|
||||||
sealed class User : PrivateChat
|
typealias CommonUser = dev.inmo.tgbotapi.types.chat.CommonUser
|
||||||
|
|
||||||
@Serializable
|
@Deprecated("Replaced", ReplaceWith("ExtendedUser", "dev.inmo.tgbotapi.types.chat.ExtendedUser"))
|
||||||
data class CommonUser(
|
typealias ExtendedUser = dev.inmo.tgbotapi.types.chat.ExtendedUser
|
||||||
override val id: UserId,
|
|
||||||
@SerialName(firstNameField)
|
|
||||||
override val firstName: String,
|
|
||||||
@SerialName(lastNameField)
|
|
||||||
override val lastName: String = "",
|
|
||||||
@SerialName(usernameField)
|
|
||||||
override val username: Username? = null,
|
|
||||||
@SerialName(languageCodeField)
|
|
||||||
@Serializable(IetfLanguageCodeSerializer::class)
|
|
||||||
override val ietfLanguageCode: IetfLanguageCode? = null
|
|
||||||
) : User(), WithOptionalLanguageCode {
|
|
||||||
constructor(
|
|
||||||
id: UserId,
|
|
||||||
firstName: String,
|
|
||||||
lastName: String = "",
|
|
||||||
username: Username? = null,
|
|
||||||
languageCode: String
|
|
||||||
) : this(id, firstName, lastName, username, IetfLanguageCode(languageCode))
|
|
||||||
}
|
|
||||||
|
|
||||||
@PreviewFeature
|
@Deprecated("Replaced", ReplaceWith("Bot", "dev.inmo.tgbotapi.types.chat.Bot"))
|
||||||
typealias ExtendedUser = ExtendedPrivateChatImpl
|
typealias Bot = dev.inmo.tgbotapi.types.chat.Bot
|
||||||
|
|
||||||
@Serializable(UserSerializer::class)
|
@Deprecated("Replaced", ReplaceWith("CommonBot", "dev.inmo.tgbotapi.types.chat.CommonBot"))
|
||||||
sealed class Bot : User() {
|
typealias CommonBot = dev.inmo.tgbotapi.types.chat.CommonBot
|
||||||
abstract override val username: Username
|
|
||||||
}
|
|
||||||
|
|
||||||
@Serializable
|
@Deprecated("Replaced", ReplaceWith("ExtendedBot", "dev.inmo.tgbotapi.types.chat.ExtendedBot"))
|
||||||
data class CommonBot(
|
typealias ExtendedBot = dev.inmo.tgbotapi.types.chat.ExtendedBot
|
||||||
override val id: UserId,
|
|
||||||
@SerialName(usernameField)
|
|
||||||
override val username: Username,
|
|
||||||
@SerialName(firstNameField)
|
|
||||||
override val firstName: String,
|
|
||||||
@SerialName(lastNameField)
|
|
||||||
override val lastName: String = ""
|
|
||||||
) : Bot() {
|
|
||||||
@SerialName(isBotField)
|
|
||||||
private val isBot = true
|
|
||||||
}
|
|
||||||
|
|
||||||
@Serializable
|
@Deprecated("Replaced", ReplaceWith("UserSerializer", "dev.inmo.tgbotapi.types.chat.UserSerializer"))
|
||||||
data class ExtendedBot(
|
typealias UserSerializer = dev.inmo.tgbotapi.types.chat.UserSerializer
|
||||||
override val id: UserId,
|
|
||||||
@SerialName(usernameField)
|
|
||||||
override val username: Username,
|
|
||||||
@SerialName(firstNameField)
|
|
||||||
override val firstName: String,
|
|
||||||
@SerialName(lastNameField)
|
|
||||||
override val lastName: String = "",
|
|
||||||
@SerialName(canJoinGroupsField)
|
|
||||||
val canJoinGroups: Boolean = false,
|
|
||||||
@SerialName(canReadAllGroupMessagesField)
|
|
||||||
val canReadAllGroupMessages: Boolean = false,
|
|
||||||
@SerialName(supportInlineQueriesField)
|
|
||||||
val supportsInlineQueries: Boolean = false
|
|
||||||
) : Bot() {
|
|
||||||
@SerialName(isBotField)
|
|
||||||
private val isBot = true
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@RiskFeature
|
|
||||||
object UserSerializer : KSerializer<User> {
|
|
||||||
private val internalSerializer = JsonObject.serializer()
|
|
||||||
override val descriptor: SerialDescriptor = internalSerializer.descriptor
|
|
||||||
override fun deserialize(decoder: Decoder): User {
|
|
||||||
val asJson = internalSerializer.deserialize(decoder)
|
|
||||||
|
|
||||||
return when {
|
|
||||||
asJson[isBotField] ?.jsonPrimitive ?.booleanOrNull != true -> nonstrictJsonFormat.decodeFromJsonElement(
|
|
||||||
CommonUser.serializer(),
|
|
||||||
asJson
|
|
||||||
)
|
|
||||||
else -> {
|
|
||||||
if ((asJson[canJoinGroupsField]
|
|
||||||
?: asJson[canReadAllGroupMessagesField]
|
|
||||||
?: asJson[supportInlineQueriesField]) != null
|
|
||||||
) {
|
|
||||||
nonstrictJsonFormat.decodeFromJsonElement(
|
|
||||||
ExtendedBot.serializer(),
|
|
||||||
asJson
|
|
||||||
)
|
|
||||||
} else {
|
|
||||||
nonstrictJsonFormat.decodeFromJsonElement(
|
|
||||||
CommonBot.serializer(),
|
|
||||||
asJson
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun serialize(encoder: Encoder, value: User) {
|
|
||||||
when (value) {
|
|
||||||
is CommonUser -> CommonUser.serializer().serialize(encoder, value)
|
|
||||||
is CommonBot -> CommonBot.serializer().serialize(encoder, value)
|
|
||||||
is ExtendedBot -> ExtendedBot.serializer().serialize(encoder, value)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user