Better handling of non-string message texts

Now everything will be allowed and automatically casted to string. This
means that send_message(id, True) would send "True", literally.
This commit is contained in:
Dan 2019-07-28 10:13:38 +02:00
parent bed13de413
commit e1c6e6ecc1

View File

@ -31,7 +31,7 @@ class Parser:
self.markdown = Markdown(client) self.markdown = Markdown(client)
def parse(self, text: str, mode: Union[str, None] = object): def parse(self, text: str, mode: Union[str, None] = object):
text = str(text or "").strip() text = str(text).strip()
if mode == object: if mode == object:
if self.client: if self.client: