Skip to content

Commit

Permalink
fixup bs4 error
Browse files Browse the repository at this point in the history
  • Loading branch information
rking32 committed Apr 22, 2020
1 parent 3ec6e56 commit 5a0623d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
git+https://github.com/pyrogram/pyrogram.git@asyncio-dev
BeautifulSoup
bs4
cowpy
dnspython
emoji
Expand Down
9 changes: 7 additions & 2 deletions userge/core/_userge/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ def __init__(self) -> None:

self.__help_dict: Dict[str, Dict[str, str]] = {}
self.__imported: List[ModuleType] = []
self.__channel = self.getCLogger(__name__)

LOG.info(LOG_STR, "Setting Userge Configs")

Expand Down Expand Up @@ -145,8 +146,9 @@ async def send_message(self,
Text of the message to be sent.
del_in (``int``):
Time in Seconds for delete that message.
log (``bool``, *optional*):
log (``bool`` | ``str``, *optional*):
If ``True``, the message will be forwarded to the log channel.
If ``str``, the logger name will be updated.
parse_mode (``str``, *optional*):
By default, texts are parsed using both Markdown and HTML styles.
You can combine both syntaxes together.
Expand Down Expand Up @@ -179,7 +181,10 @@ async def send_message(self,
reply_markup=reply_markup)

if log:
await self.getCLogger(__name__).fwd_msg(msg)
if isinstance(log, str):
self.__channel.update(log)

await self.__channel.fwd_msg(msg)

del_in = del_in or Config.MSG_DELETE_TIMEOUT

Expand Down

0 comments on commit 5a0623d

Please sign in to comment.