mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2025-09-02 22:59:48 +00:00
commands handling added
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.GetMe
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.extensions.api.bot.getMe
|
||||
|
||||
suspend fun RequestsExecutor.getMe() = execute(GetMe())
|
||||
@Deprecated(
|
||||
"Replaced",
|
||||
ReplaceWith("getMe", "com.github.insanusmokrassar.TelegramBotAPI.extensions.api.bot.GetMeKt.getMe")
|
||||
)
|
||||
suspend fun RequestsExecutor.getMe() = getMe()
|
@@ -0,0 +1,6 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.bot
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.bot.GetMe
|
||||
|
||||
suspend fun RequestsExecutor.getMe() = execute(GetMe)
|
@@ -0,0 +1,6 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.bot
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.bot.GetMyCommands
|
||||
|
||||
suspend fun RequestsExecutor.getMyCommands() = execute(GetMyCommands)
|
@@ -0,0 +1,10 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.bot
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.bot.GetMyCommands
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.bot.SetMyCommands
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.BotCommand
|
||||
|
||||
suspend fun RequestsExecutor.setMyCommands(
|
||||
commands: List<BotCommand>
|
||||
) = execute(SetMyCommands(commands))
|
Reference in New Issue
Block a user