Ability to run multiple handlers

🐛 Fix filter type hint
This commit is contained in:
Sam 2022-01-20 01:04:13 +08:00
parent db65a10f03
commit a546776a56
Signed by: sam01101
GPG Key ID: 42D7B6D13FF5E611
2 changed files with 2 additions and 3 deletions

View File

@ -234,7 +234,6 @@ class Dispatcher:
except Exception as e:
log.error(e, exc_info=True)
break
except pyrogram.StopPropagation:
pass
except Exception as e:

View File

@ -18,7 +18,7 @@
import inspect
import re
from typing import Callable, Union, List, Pattern
from typing import Callable, Union, List, Pattern, Tuple
import pyrogram
from pyrogram.types import Message, CallbackQuery, InlineQuery, InlineKeyboardMarkup, ReplyKeyboardMarkup, Update
@ -749,7 +749,7 @@ linked_channel = create(linked_channel_filter)
username = None
def command(commands: Union[str, List[str]], prefixes: Union[str, List[str]] = "/", case_sensitive: bool = False):
def command(commands: Union[str, List[str], Tuple[str]], prefixes: Union[str, List[str]] = "/", case_sensitive: bool = False):
"""Filter commands, i.e.: text messages starting with "/" or any other custom prefix.
Parameters: