✨ Ability to run multiple handlers
🐛 Fix filter type hint
This commit is contained in:
parent
db65a10f03
commit
a546776a56
@ -234,7 +234,6 @@ class Dispatcher:
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
log.error(e, exc_info=True)
|
log.error(e, exc_info=True)
|
||||||
|
|
||||||
break
|
|
||||||
except pyrogram.StopPropagation:
|
except pyrogram.StopPropagation:
|
||||||
pass
|
pass
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
import inspect
|
import inspect
|
||||||
import re
|
import re
|
||||||
from typing import Callable, Union, List, Pattern
|
from typing import Callable, Union, List, Pattern, Tuple
|
||||||
|
|
||||||
import pyrogram
|
import pyrogram
|
||||||
from pyrogram.types import Message, CallbackQuery, InlineQuery, InlineKeyboardMarkup, ReplyKeyboardMarkup, Update
|
from pyrogram.types import Message, CallbackQuery, InlineQuery, InlineKeyboardMarkup, ReplyKeyboardMarkup, Update
|
||||||
@ -749,7 +749,7 @@ linked_channel = create(linked_channel_filter)
|
|||||||
username = None
|
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.
|
"""Filter commands, i.e.: text messages starting with "/" or any other custom prefix.
|
||||||
|
|
||||||
Parameters:
|
Parameters:
|
||||||
|
Loading…
Reference in New Issue
Block a user