Skip to content

Commit

Permalink
disable link preview while logging to channel
Browse files Browse the repository at this point in the history
  • Loading branch information
rking32 committed Mar 19, 2022
1 parent 579b0e2 commit 25dc432
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion min_loader.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.8
4.1
3 changes: 2 additions & 1 deletion userge/core/types/new/channel_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ async def log(self, text: str, name: str = '') -> int:
string = _gen_string(name)
try:
msg = await self._client.send_message(chat_id=self._id,
text=string.format(text.strip()))
text=string.format(text.strip()),
disable_web_page_preview=True)
except MessageTooLong:
msg = await self._client.send_as_file(chat_id=self._id,
text=string.format(text.strip()),
Expand Down

0 comments on commit 25dc432

Please sign in to comment.