1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2026-04-07 10:32:44 +00:00

complete support of ManagedBotCreated and ManagedBotUpdated, add getManagedBotToken and replaceManagedBotToken

This commit is contained in:
2026-04-06 15:47:38 +06:00
parent b37dda6f47
commit de13ddeb54
21 changed files with 333 additions and 2 deletions

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.GetManagedBotToken
import dev.inmo.tgbotapi.types.BotToken
import dev.inmo.tgbotapi.types.ChatId
public suspend fun TelegramBot.getManagedBotToken(
userId: ChatId
): BotToken = execute(
GetManagedBotToken(userId = userId)
)

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.ReplaceManagedBotToken
import dev.inmo.tgbotapi.types.BotToken
import dev.inmo.tgbotapi.types.ChatId
public suspend fun TelegramBot.replaceManagedBotToken(
userId: ChatId
): BotToken = execute(
ReplaceManagedBotToken(userId = userId)
)