mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2025-12-29 12:04:51 +00:00
Show an error message for invalid parse modes
This commit is contained in:
parent
e188da7afc
commit
ba34bf84f9
1 changed files with 2 additions and 0 deletions
|
|
@ -51,6 +51,8 @@ class Parser:
|
|||
if mode == enums.ParseMode.DISABLED:
|
||||
return {"message": text, "entities": []}
|
||||
|
||||
raise ValueError(f'Invalid parse mode "{mode}"')
|
||||
|
||||
@staticmethod
|
||||
def unparse(text: str, entities: list, is_html: bool):
|
||||
if is_html:
|
||||
|
|
|
|||
Loading…
Reference in a new issue