mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2026-11-27 14:13:05 +00:00
implement 'others' changes
This commit is contained in:
1 parent
236939eab8
commit
631a4f16bd
13 files changed
+384
-40
No files matched your search
+13
@@ -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)
|
||||
)
|
||||
+12
@@ -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)
|
||||
)
|
||||
+15
@@ -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