Skip to content

Conversation

DontforgetAntaiku
Copy link

Added 3 more button requests:

  • RequestChat
  • RequestUser
  • RequestUsers

def __init__(
self,
text: Text,
RequestButton: KeyboardButtonRequestChat,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pep8?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not exactly. Ruff

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix naming according to pep8

[
KeyboardButton(
text=await self.text.render_text(data, manager),
request_user=self.RequestButton,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure it is good idea to have static request_id`

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean? If I'm not mistaking, there're no static request_id. We provide RequestButton above which was set up earlier by developer.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean once you declare widget in dialog, it will have same request id here.

Copy link

@D-Sokol D-Sokol Jul 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Static request_id is not a problem in itself since it must be unique within the message, not within the whole chat history.
https://core.telegram.org/bots/api#keyboardbuttonrequestusers

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

Successfully merging this pull request may close these issues.

3 participants