mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-05 23: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:
|
if mode == enums.ParseMode.DISABLED:
|
||||||
return {"message": text, "entities": []}
|
return {"message": text, "entities": []}
|
||||||
|
|
||||||
|
raise ValueError(f'Invalid parse mode "{mode}"')
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def unparse(text: str, entities: list, is_html: bool):
|
def unparse(text: str, entities: list, is_html: bool):
|
||||||
if is_html:
|
if is_html:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue