2020-10-04 10:57:39 +00:00
|
|
|
package dev.inmo.tgbotapi.extensions.api.bot
|
2020-03-30 15:52:00 +00:00
|
|
|
|
2021-08-05 17:36:01 +00:00
|
|
|
import dev.inmo.micro_utils.language_codes.IetfLanguageCode
|
2020-10-04 11:06:30 +00:00
|
|
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
|
|
|
import dev.inmo.tgbotapi.requests.bot.GetMyCommands
|
2021-06-25 19:42:35 +00:00
|
|
|
import dev.inmo.tgbotapi.types.commands.BotCommandScope
|
|
|
|
import dev.inmo.tgbotapi.types.commands.BotCommandScopeDefault
|
2020-03-30 15:52:00 +00:00
|
|
|
|
2021-06-25 19:42:35 +00:00
|
|
|
suspend fun TelegramBot.getMyCommands(
|
|
|
|
scope: BotCommandScope = BotCommandScopeDefault,
|
2021-08-05 17:36:01 +00:00
|
|
|
languageCode: IetfLanguageCode? = null
|
2021-06-25 19:42:35 +00:00
|
|
|
) = execute(GetMyCommands(scope, languageCode))
|
2021-08-05 17:36:01 +00:00
|
|
|
|
|
|
|
suspend fun TelegramBot.getMyCommands(
|
|
|
|
scope: BotCommandScope = BotCommandScopeDefault,
|
|
|
|
languageCode: String? = null
|
|
|
|
) = getMyCommands(scope, languageCode ?.let(::IetfLanguageCode))
|