1
0
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:
2026-05-19 23:24:23 +06:00
parent 236939eab8
commit 631a4f16bd
13 changed files with 384 additions and 40 deletions

View File

@@ -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)
)

View File

@@ -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)
)

View File

@@ -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
)
)