Skip to content

Commit

Permalink
change guard example
Browse files Browse the repository at this point in the history
  • Loading branch information
vendelieu committed Nov 21, 2024
1 parent a594037 commit 1e33ced
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ suspend fun start(user: User, bot: TelegramBot) {
bot.inputListener[user] = "conversation"
}

@InputHandler(["conversation"], guard = UserPresentGuard::class)
@InputHandler(["conversation"])
@Guard(UserPresentGuard::class)
suspend fun startConversation(update: ProcessedUpdate, user: User, bot: TelegramBot) {
message { "Nice to meet you, ${update.text}" }.send(user, bot)
message { "What is your favorite food?" }.send(user, bot)
Expand Down

0 comments on commit 1e33ced

Please sign in to comment.