mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2026-06-18 17:25:09 +00:00
implement 'others' changes
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
package dev.inmo.tgbotapi.extensions.api
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.GetUserPersonalChatMessages
|
||||
import dev.inmo.tgbotapi.types.ChatId
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||
|
||||
public suspend fun TelegramBot.getUserPersonalChatMessages(
|
||||
userId: ChatId,
|
||||
limit: Int
|
||||
): List<ContentMessage<*>> = execute(
|
||||
GetUserPersonalChatMessages(userId = userId, limit = limit)
|
||||
)
|
||||
@@ -0,0 +1,12 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.managed_bots
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.managed_bots.GetManagedBotAccessSettings
|
||||
import dev.inmo.tgbotapi.types.ChatId
|
||||
import dev.inmo.tgbotapi.types.managed_bots.BotAccessSettings
|
||||
|
||||
public suspend fun TelegramBot.getManagedBotAccessSettings(
|
||||
userId: ChatId
|
||||
): BotAccessSettings = execute(
|
||||
GetManagedBotAccessSettings(userId = userId)
|
||||
)
|
||||
@@ -0,0 +1,15 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.managed_bots
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.managed_bots.SetManagedBotAccessSettings
|
||||
import dev.inmo.tgbotapi.types.ChatId
|
||||
|
||||
public suspend fun TelegramBot.setManagedBotAccessSettings(
|
||||
userId: ChatId,
|
||||
addedUserIds: List<ChatId>? = null
|
||||
): Unit = execute(
|
||||
SetManagedBotAccessSettings(
|
||||
userId = userId,
|
||||
addedUserIds = addedUserIds
|
||||
)
|
||||
)
|
||||
Reference in New Issue
Block a user