Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
z44d committed Oct 14, 2024
1 parent 8133a62 commit 186b240
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tgram/utils/parse_mode.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
def get_parse_mode(
bot: Optional["tgram.TgBot"] = None, parse_mode: Optional[str] = None
) -> Optional[str]:
return (
None
if parse_mode and parse_mode.lower() in ("d", "disable", "disabled")
else parse_mode or (bot.parse_mode if bot else None)
)
parse_mode = parse_mode or (bot.parse_mode if bot else None)

if parse_mode and parse_mode.lower() in {"d", "disable", "disabled"}:
return None
return parse_mode

0 comments on commit 186b240

Please sign in to comment.