mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-12-22 16:47:13 +00:00
add suport of unpinAllGeneralForumTopicMessages
This commit is contained in:
parent
0840d2e083
commit
4b5baaff8c
@ -0,0 +1,21 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.chat.forum
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.chat.forum.UnpinAllForumTopicMessages
|
||||
import dev.inmo.tgbotapi.requests.chat.forum.UnpinAllGeneralForumTopicMessages
|
||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||
import dev.inmo.tgbotapi.types.ForumTopic
|
||||
import dev.inmo.tgbotapi.types.MessageThreadId
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
|
||||
suspend fun TelegramBot.unpinAllGeneralForumTopicMessages(
|
||||
chatId: ChatIdentifier
|
||||
) = execute(
|
||||
UnpinAllGeneralForumTopicMessages(
|
||||
chatId
|
||||
)
|
||||
)
|
||||
|
||||
suspend fun TelegramBot.unpinAllGeneralForumTopicMessages(
|
||||
chat: Chat
|
||||
) = unpinAllGeneralForumTopicMessages(chat.id)
|
@ -0,0 +1,14 @@
|
||||
package dev.inmo.tgbotapi.requests.chat.forum
|
||||
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import kotlinx.serialization.*
|
||||
|
||||
@Serializable
|
||||
data class UnpinAllGeneralForumTopicMessages (
|
||||
@SerialName(chatIdField)
|
||||
override val chatId: ChatIdentifier,
|
||||
): ModifyForumRequest {
|
||||
override fun method(): String = "unpinAllGeneralForumTopicMessages"
|
||||
override val requestSerializer: SerializationStrategy<*>
|
||||
get() = serializer()
|
||||
}
|
Loading…
Reference in New Issue
Block a user