Skip to content

Commit

Permalink
minor fixes in notes, filters and disable_web_page_preview in help
Browse files Browse the repository at this point in the history
  • Loading branch information
rking32 committed Jul 10, 2020
1 parent 5c3a0b3 commit b4f4d42
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
9 changes: 4 additions & 5 deletions userge/core/types/new/channel_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,17 +250,17 @@ async def forward_stored(self,
None
"""
if message_id and isinstance(message_id, int):
message = await self._client.get_messages(chat_id=Config.LOG_CHANNEL_ID,
message_ids=message_id)
message = await client.get_messages(chat_id=Config.LOG_CHANNEL_ID,
message_ids=message_id)
caption = ''
file_id = file_ref = None
if message.caption:
caption = message.caption.html.split('\n\n', maxsplit=1)[-1]
elif message.text:
caption = message.text.html.split('\n\n', maxsplit=1)[-1]
if caption:
u_dict = await self._client.get_user_dict(user_id)
chat = await self._client.get_chat(chat_id)
u_dict = await client.get_user_dict(user_id)
chat = await client.get_chat(chat_id)
u_dict.update({
'chat': chat.title if chat.title else "this group",
'count': chat.members_count})
Expand All @@ -274,7 +274,6 @@ async def forward_stored(self,
file_ref=file_ref,
caption=caption,
reply_to_message_id=reply_to_message_id,
disable_web_page_preview=True,
reply_markup=InlineKeyboardMarkup(buttons)
if hasattr(client, 'ubot') and buttons else None)
else:
Expand Down
2 changes: 1 addition & 1 deletion userge/core/types/raw/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def __init__(self, client: '_client.Userge', name: str, parent: str) -> None:
self._client = client
self.name = name
self.parent = parent
self.about: Optional[str]
self.about: Optional[str] = None
self.commands: List['command.Command'] = []
self.filters: List['_filter.Filter'] = []
_LOG.debug(_LOG_STR, f"created plugin -> {self.name}")
Expand Down
2 changes: 1 addition & 1 deletion userge/plugins/help.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ async def helpme(message: Message) -> None: # pylint: disable=missing-function-
out_str = f"<code>{key_}</code>\n\n{commands[key_].about}"
else:
out_str = f"<i>No Module or Command Found for</i>: <code>{message.input_str}</code>"
await message.edit(out_str, del_in=0, parse_mode='html')
await message.edit(out_str, del_in=0, parse_mode='html', disable_web_page_preview=True)

if Config.BOT_TOKEN and Config.OWNER_ID:
if Config.HU_STRING_SESSION:
Expand Down

0 comments on commit b4f4d42

Please sign in to comment.