diff --git a/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/ExportChatInviteLink.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/ExportChatInviteLink.kt index e10e837238..44fd294ef5 100644 --- a/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/ExportChatInviteLink.kt +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/ExportChatInviteLink.kt @@ -5,6 +5,7 @@ import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleRequest import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat +import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PublicChat import com.github.insanusmokrassar.TelegramBotAPI.types.chatIdField import kotlinx.serialization.* import kotlinx.serialization.internal.StringSerializer @@ -26,5 +27,5 @@ suspend fun RequestsExecutor.exportChatInviteLink( ) = execute(ExportChatInviteLink(chatId)) suspend fun RequestsExecutor.exportChatInviteLink( - chat: Chat + chat: PublicChat ) = exportChatInviteLink(chat.id) diff --git a/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/LeaveChat.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/LeaveChat.kt index edd469342a..2c9b1f6e88 100644 --- a/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/LeaveChat.kt +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/LeaveChat.kt @@ -5,6 +5,7 @@ import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleRequest import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat +import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PublicChat import com.github.insanusmokrassar.TelegramBotAPI.types.chatIdField import kotlinx.serialization.* import kotlinx.serialization.internal.BooleanSerializer @@ -26,5 +27,5 @@ suspend fun RequestsExecutor.leaveChat( ) = execute(LeaveChat(chatId)) suspend fun RequestsExecutor.leaveChat( - chat: Chat + chat: PublicChat ) = leaveChat(chat.id) diff --git a/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/get/GetChatAdministrators.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/get/GetChatAdministrators.kt index 51d8a2665f..5536179497 100644 --- a/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/get/GetChatAdministrators.kt +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/get/GetChatAdministrators.kt @@ -7,6 +7,7 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier import com.github.insanusmokrassar.TelegramBotAPI.types.ChatMember.abstracts.AdministratorChatMember import com.github.insanusmokrassar.TelegramBotAPI.types.ChatMember.abstracts.AdministratorChatMemberSerializerWithoutDeserialization import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat +import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PublicChat import com.github.insanusmokrassar.TelegramBotAPI.types.chatIdField import kotlinx.serialization.* import kotlinx.serialization.internal.ArrayListSerializer @@ -32,5 +33,5 @@ suspend fun RequestsExecutor.getChatAdministrators( ) = execute(GetChatAdministrators(chatId)) suspend fun RequestsExecutor.getChatAdministrators( - chat: Chat + chat: PublicChat ) = getChatAdministrators(chat.id) diff --git a/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/get/GetChatMembersCount.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/get/GetChatMembersCount.kt index 8d30508a91..0b8921a8b6 100644 --- a/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/get/GetChatMembersCount.kt +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/get/GetChatMembersCount.kt @@ -5,6 +5,7 @@ import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleRequest import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat +import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PublicChat import com.github.insanusmokrassar.TelegramBotAPI.types.chatIdField import kotlinx.serialization.* import kotlinx.serialization.internal.IntSerializer @@ -26,5 +27,5 @@ suspend fun RequestsExecutor.getChatMembersCount( ) = execute(GetChatMembersCount(chatId)) suspend fun RequestsExecutor.getChatMembersCount( - chat: Chat + chat: PublicChat ) = getChatMembersCount(chat.id) diff --git a/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/members/GetChatMember.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/members/GetChatMember.kt index 073170c003..31e2b092f1 100644 --- a/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/members/GetChatMember.kt +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/members/GetChatMember.kt @@ -7,6 +7,7 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.* import com.github.insanusmokrassar.TelegramBotAPI.types.ChatMember.abstracts.ChatMember import com.github.insanusmokrassar.TelegramBotAPI.types.ChatMember.abstracts.ChatMemberDeserializationStrategy import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat +import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PublicChat import kotlinx.serialization.* @Serializable @@ -29,7 +30,7 @@ suspend fun RequestsExecutor.getChatMember( ) = execute(GetChatMember(chatId, userId)) suspend fun RequestsExecutor.getChatMember( - chat: Chat, + chat: PublicChat, userId: UserId ) = getChatMember(chat.id, userId) @@ -39,6 +40,6 @@ suspend fun RequestsExecutor.getChatMember( ) = getChatMember(chatId, user.id) suspend fun RequestsExecutor.getChatMember( - chat: Chat, + chat: PublicChat, user: User ) = getChatMember(chat.id, user.id) diff --git a/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/members/KickChatMember.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/members/KickChatMember.kt index 365075b1f2..c7edc4e10e 100644 --- a/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/members/KickChatMember.kt +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/members/KickChatMember.kt @@ -5,6 +5,7 @@ import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor import com.github.insanusmokrassar.TelegramBotAPI.requests.chat.abstracts.ChatMemberRequest import com.github.insanusmokrassar.TelegramBotAPI.types.* import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat +import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PublicChat import kotlinx.serialization.* import kotlinx.serialization.internal.BooleanSerializer @@ -31,7 +32,7 @@ suspend fun RequestsExecutor.kickChatMember( ) = execute(KickChatMember(chatId, userId, untilDate)) suspend fun RequestsExecutor.kickChatMember( - chat: Chat, + chat: PublicChat, userId: UserId, untilDate: TelegramDate? = null ) = kickChatMember(chat.id, userId, untilDate) @@ -43,7 +44,7 @@ suspend fun RequestsExecutor.kickChatMember( ) = kickChatMember(chatId, user.id, untilDate) suspend fun RequestsExecutor.kickChatMember( - chat: Chat, + chat: PublicChat, user: User, untilDate: TelegramDate? = null ) = kickChatMember(chat.id, user.id, untilDate) diff --git a/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/members/PromoteChatMember.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/members/PromoteChatMember.kt index ad0c26f55f..a6906518c8 100644 --- a/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/members/PromoteChatMember.kt +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/members/PromoteChatMember.kt @@ -5,6 +5,7 @@ import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor import com.github.insanusmokrassar.TelegramBotAPI.requests.chat.abstracts.ChatMemberRequest import com.github.insanusmokrassar.TelegramBotAPI.types.* import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat +import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PublicChat import kotlinx.serialization.* import kotlinx.serialization.internal.BooleanSerializer @@ -69,7 +70,7 @@ suspend fun RequestsExecutor.promoteChatMember( ) suspend fun RequestsExecutor.promoteChatMember( - chat: Chat, + chat: PublicChat, userId: UserId, untilDate: TelegramDate? = null, canChangeInfo: Boolean? = null, @@ -121,7 +122,7 @@ suspend fun RequestsExecutor.promoteChatMember( ) suspend fun RequestsExecutor.promoteChatMember( - chat: Chat, + chat: PublicChat, user: User, untilDate: TelegramDate? = null, canChangeInfo: Boolean? = null, diff --git a/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/members/RestrictChatMember.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/members/RestrictChatMember.kt index 2457510f29..37b048956d 100644 --- a/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/members/RestrictChatMember.kt +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/members/RestrictChatMember.kt @@ -6,6 +6,7 @@ import com.github.insanusmokrassar.TelegramBotAPI.requests.chat.abstracts.ChatMe import com.github.insanusmokrassar.TelegramBotAPI.types.* import com.github.insanusmokrassar.TelegramBotAPI.types.chat.ChatPermissions import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat +import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PublicChat import kotlinx.serialization.* import kotlinx.serialization.internal.BooleanSerializer @@ -35,7 +36,7 @@ suspend fun RequestsExecutor.restrictChatMember( ) = execute(RestrictChatMember(chatId, userId, untilDate, permissions)) suspend fun RequestsExecutor.restrictChatMember( - chat: Chat, + chat: PublicChat, userId: UserId, untilDate: TelegramDate? = null, permissions: ChatPermissions = ChatPermissions() @@ -49,7 +50,7 @@ suspend fun RequestsExecutor.restrictChatMember( ) = restrictChatMember(chatId, user.id, untilDate, permissions) suspend fun RequestsExecutor.restrictChatMember( - chat: Chat, + chat: PublicChat, user: User, untilDate: TelegramDate? = null, permissions: ChatPermissions = ChatPermissions() diff --git a/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/members/SetChatAdministratorCustomTitle.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/members/SetChatAdministratorCustomTitle.kt index d54676c93c..21106423a6 100644 --- a/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/members/SetChatAdministratorCustomTitle.kt +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/members/SetChatAdministratorCustomTitle.kt @@ -4,6 +4,7 @@ import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor import com.github.insanusmokrassar.TelegramBotAPI.requests.chat.abstracts.ChatMemberRequest import com.github.insanusmokrassar.TelegramBotAPI.types.* import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat +import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PublicChat import kotlinx.serialization.* import kotlinx.serialization.internal.BooleanSerializer @@ -41,7 +42,7 @@ suspend fun RequestsExecutor.setChatAdministratorCustomTitle( ) = execute(SetChatAdministratorCustomTitle(chatId, userId, customTitle)) suspend fun RequestsExecutor.setChatAdministratorCustomTitle( - chat: Chat, + chat: PublicChat, userId: UserId, customTitle: String ) = setChatAdministratorCustomTitle(chat.id, userId, customTitle) @@ -53,7 +54,7 @@ suspend fun RequestsExecutor.setChatAdministratorCustomTitle( ) = setChatAdministratorCustomTitle(chatId, user.id, customTitle) suspend fun RequestsExecutor.setChatAdministratorCustomTitle( - chat: Chat, + chat: PublicChat, user: User, customTitle: String ) = setChatAdministratorCustomTitle(chat.id, user.id, customTitle) \ No newline at end of file diff --git a/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/members/UnbanChatMember.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/members/UnbanChatMember.kt index f35b9a2523..470b328684 100644 --- a/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/members/UnbanChatMember.kt +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/members/UnbanChatMember.kt @@ -4,6 +4,7 @@ import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor import com.github.insanusmokrassar.TelegramBotAPI.requests.chat.abstracts.ChatMemberRequest import com.github.insanusmokrassar.TelegramBotAPI.types.* import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat +import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PublicChat import kotlinx.serialization.* import kotlinx.serialization.internal.BooleanSerializer @@ -27,7 +28,7 @@ suspend fun RequestsExecutor.unbanChatMember( ) = execute(UnbanChatMember(chatId, userId)) suspend fun RequestsExecutor.unbanChatMember( - chat: Chat, + chat: PublicChat, userId: UserId ) = unbanChatMember(chat.id, userId) @@ -37,7 +38,7 @@ suspend fun RequestsExecutor.unbanChatMember( ) = unbanChatMember(chatId, user.id) suspend fun RequestsExecutor.unbanChatMember( - chat: Chat, + chat: PublicChat, user: User ) = unbanChatMember(chat.id, user.id) diff --git a/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/DeleteChatPhoto.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/DeleteChatPhoto.kt index 84f91bc964..6a8eaa4f06 100644 --- a/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/DeleteChatPhoto.kt +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/DeleteChatPhoto.kt @@ -6,6 +6,7 @@ import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleReque import com.github.insanusmokrassar.TelegramBotAPI.requests.chat.get.GetChat import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat +import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PublicChat import com.github.insanusmokrassar.TelegramBotAPI.types.chatIdField import kotlinx.serialization.* import kotlinx.serialization.internal.BooleanSerializer @@ -27,5 +28,5 @@ suspend fun RequestsExecutor.deleteChatPhoto( ) = execute(DeleteChatPhoto(chatId)) suspend fun RequestsExecutor.deleteChatPhoto( - chat: Chat + chat: PublicChat ) = deleteChatPhoto(chat.id) diff --git a/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/PinChatMessage.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/PinChatMessage.kt index 7b98e0684a..ef1f239cad 100644 --- a/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/PinChatMessage.kt +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/PinChatMessage.kt @@ -5,6 +5,7 @@ import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleRequest import com.github.insanusmokrassar.TelegramBotAPI.types.* import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat +import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PublicChat import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.Message import kotlinx.serialization.* import kotlinx.serialization.internal.BooleanSerializer @@ -32,7 +33,7 @@ suspend fun RequestsExecutor.pinChatMessage( ) = execute(PinChatMessage(chatId, messageId, disableNotification)) suspend fun RequestsExecutor.pinChatMessage( - chat: Chat, + chat: PublicChat, messageId: MessageIdentifier, disableNotification: Boolean = false ) = pinChatMessage(chat.id, messageId, disableNotification) @@ -44,7 +45,7 @@ suspend fun RequestsExecutor.pinChatMessage( ) = execute(PinChatMessage(chatId, message.messageId, disableNotification)) suspend fun RequestsExecutor.pinChatMessage( - chat: Chat, + chat: PublicChat, message: Message, disableNotification: Boolean = false ) = pinChatMessage(chat.id, message.messageId, disableNotification) diff --git a/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/SetChatDescription.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/SetChatDescription.kt index b4fbbfea5f..82dc2e9e61 100644 --- a/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/SetChatDescription.kt +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/SetChatDescription.kt @@ -5,6 +5,7 @@ import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleRequest import com.github.insanusmokrassar.TelegramBotAPI.types.* import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat +import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PublicChat import kotlinx.serialization.* import kotlinx.serialization.internal.BooleanSerializer @@ -34,6 +35,6 @@ suspend fun RequestsExecutor.setChatDescription( ) = execute(SetChatDescription(chatId, description)) suspend fun RequestsExecutor.setChatDescription( - chat: Chat, + chat: PublicChat, description: String ) = setChatDescription(chat.id, description) diff --git a/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/SetChatPermissions.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/SetChatPermissions.kt index c57dfabe11..57fa318efb 100644 --- a/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/SetChatPermissions.kt +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/SetChatPermissions.kt @@ -6,6 +6,7 @@ import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleReque import com.github.insanusmokrassar.TelegramBotAPI.types.* import com.github.insanusmokrassar.TelegramBotAPI.types.chat.ChatPermissions import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat +import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PublicChat import kotlinx.serialization.* import kotlinx.serialization.internal.BooleanSerializer @@ -29,6 +30,6 @@ suspend fun RequestsExecutor.setChatPermissions( ) = execute(SetChatPermissions(chatId, permissions)) suspend fun RequestsExecutor.setChatPermissions( - chat: Chat, + chat: PublicChat, permissions: ChatPermissions ) = setChatPermissions(chat.id, permissions) diff --git a/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/SetChatPhoto.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/SetChatPhoto.kt index 65282ef225..66104e00fa 100644 --- a/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/SetChatPhoto.kt +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/SetChatPhoto.kt @@ -7,6 +7,7 @@ import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.MultipartRe import com.github.insanusmokrassar.TelegramBotAPI.types.* import com.github.insanusmokrassar.TelegramBotAPI.types.chat.ChatPermissions import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat +import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PublicChat import com.github.insanusmokrassar.TelegramBotAPI.utils.toJson import kotlinx.serialization.* import kotlinx.serialization.internal.BooleanSerializer @@ -31,6 +32,6 @@ suspend fun RequestsExecutor.setChatPermissions( ) = execute(SetChatPhoto(chatId, photo)) suspend fun RequestsExecutor.setChatPermissions( - chat: Chat, + chat: PublicChat, photo: MultipartFile ) = setChatPermissions(chat.id, photo) diff --git a/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/SetChatTitle.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/SetChatTitle.kt index d66a7122ba..a6c040c2ea 100644 --- a/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/SetChatTitle.kt +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/SetChatTitle.kt @@ -6,6 +6,7 @@ import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.MultipartFi import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleRequest import com.github.insanusmokrassar.TelegramBotAPI.types.* import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat +import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PublicChat import kotlinx.serialization.* import kotlinx.serialization.internal.BooleanSerializer @@ -35,6 +36,6 @@ suspend fun RequestsExecutor.setChatTitle( ) = execute(SetChatTitle(chatId, title)) suspend fun RequestsExecutor.setChatTitle( - chat: Chat, + chat: PublicChat, title: String ) = setChatTitle(chat.id, title) diff --git a/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/UnpinChatMessage.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/UnpinChatMessage.kt index 1d845df7aa..c746e14fe9 100644 --- a/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/UnpinChatMessage.kt +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/UnpinChatMessage.kt @@ -5,6 +5,7 @@ import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleRequest import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat +import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PublicChat import com.github.insanusmokrassar.TelegramBotAPI.types.chatIdField import kotlinx.serialization.* import kotlinx.serialization.internal.BooleanSerializer @@ -26,5 +27,5 @@ suspend fun RequestsExecutor.unpinChatMessage( ) = execute(UnpinChatMessage(chatId)) suspend fun RequestsExecutor.unpinChatMessage( - chat: Chat + chat: PublicChat ) = unpinChatMessage(chat.id) diff --git a/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/stickers/DeleteChatStickerSet.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/stickers/DeleteChatStickerSet.kt index dd0b896680..f3f5ef202c 100644 --- a/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/stickers/DeleteChatStickerSet.kt +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/stickers/DeleteChatStickerSet.kt @@ -6,6 +6,7 @@ import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleReque import com.github.insanusmokrassar.TelegramBotAPI.requests.chat.modify.DeleteChatPhoto import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat +import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PublicChat import com.github.insanusmokrassar.TelegramBotAPI.types.chatIdField import kotlinx.serialization.* import kotlinx.serialization.internal.BooleanSerializer @@ -27,5 +28,5 @@ suspend fun RequestsExecutor.deleteChatStickerSet( ) = execute(DeleteChatStickerSet(chatId)) suspend fun RequestsExecutor.deleteChatStickerSet( - chat: Chat + chat: PublicChat ) = deleteChatStickerSet(chat.id) diff --git a/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/stickers/SetChatStickerSet.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/stickers/SetChatStickerSet.kt index 6eb1234a24..15ded57e65 100644 --- a/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/stickers/SetChatStickerSet.kt +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/stickers/SetChatStickerSet.kt @@ -5,6 +5,7 @@ import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleRequest import com.github.insanusmokrassar.TelegramBotAPI.types.* import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat +import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PublicChat import kotlinx.serialization.* import kotlinx.serialization.internal.BooleanSerializer @@ -28,6 +29,6 @@ suspend fun RequestsExecutor.setChatStickerSet( ) = execute(SetChatStickerSet(chatId, stickerSetName)) suspend fun RequestsExecutor.setChatStickerSet( - chat: Chat, + chat: PublicChat, stickerSetName: StickerSetName ) = setChatStickerSet(chat.id, stickerSetName)