mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2026-11-27 14:13:05 +00:00
complete support of ManagedBotCreated and ManagedBotUpdated, add getManagedBotToken and replaceManagedBotToken
This commit is contained in:
1 parent
b37dda6f47
commit
de13ddeb54
21 files changed
+333
-2
No files matched your search
+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.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)
|
||||
)
|
||||
+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.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)
|
||||
)
|
||||
Reference in new issue
Block a user