add hasCommand

This commit is contained in:
Alexander Buntakov 2022-11-18 01:33:45 +03:00
parent d05e4fe4c5
commit 02e0df53a3
1 changed files with 2 additions and 0 deletions

View File

@ -9,6 +9,8 @@ open class MessageContext<U, S>(
val state: S
) {
fun hasCommand(command: String) = messageCommand.command == command
val chatId: String
get() = origin.message?.chatId?.toString()
?: origin.callbackQuery.message.chatId.toString()