From 2dab89fd9abc5e20432fee241d4ed94ed7c55265 Mon Sep 17 00:00:00 2001 From: guangrei <20879950+guangrei@users.noreply.github.com> Date: Thu, 11 Jan 2024 16:20:50 +0700 Subject: [PATCH] update README..md --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index a9066be..b179af8 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,15 @@ func = chatrouter.util.get_func("group_name", "command_name") 8. support asynchronous. +9. support midleware + +```python +@chatbot.midleware() +def limit_user(): + allowed_user_id = (123, 456) + return chatrouter.data_user.id in allowed_user_id +``` + ## installation ```