Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Telegram Topics - Replying in General chat doesn't dork #3997

Open
roman2861 opened this issue Dec 10, 2022 · 4 comments
Open

Telegram Topics - Replying in General chat doesn't dork #3997

roman2861 opened this issue Dec 10, 2022 · 4 comments

Comments

@roman2861
Copy link

Hello! I see an issue with Topics - if bot replies to the message in General chat, answer goes to the messages mode (in other words, it gets hidden). If I do the same thing in any Topic - reply returns to the same topic as expected.

@Lonami
Copy link
Member

Lonami commented Dec 11, 2022

Could you post the code causing this issue?

@roman2861
Copy link
Author

Sure.

 @bot.on(events.NewMessage(func=lambda e: e.raw_text.lower() == "/ban"))
 async def ban_command(event: events.ChatAction.Event):
     reply_msg = await event.get_reply_message()
     replied_to_user = reply_msg.sender
     try:
         await bot.edit_permissions(event.chat.id, replied_to_user.id, view_messages=False)
         respond_message = await event.respond('User {{{user}}} was banned', parse_mode="md")
         await event.delete()
     except Exception as e:
         print(e)

@Lonami
Copy link
Member

Lonami commented Dec 11, 2022

Could you better describe what the error is and what the expected behavior is? I am having a hard time understanding what should be happening instead.

@roman2861
Copy link
Author

bug.mp4

Uploaded a video. If I reply to message in General chat (the only which wasn't created by me, that's default chat) it gets hidden and answer too. It gets unmarked and can be visible only in Messages view.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants