Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[FEATURE] Duplicate #1813

Closed
Closed
🐛 bug
@XieJiSS

Description

@XieJiSS

Is your feature request related to a problem? Please describe.

Bot-created identified poll will receivepollAnswer updates from the Telegram server when users submit their choices (or retract their votes), which contain info about the voter (name,uid, etc.).

Describe the solution you'd like

Create apollAnswer class and implement related methods.

"poll_answer": {"poll_id":"0000000000000000000","user": {"id":000000000,"is_bot":false,"first_name":"first name","last_name":"last name","username":"username","language_code":"en"    },"option_ids": [0 ]  }

P.S.option_ids might be[] when a user retract his/her vote, or[0, 1] for a multiple-choice poll

Describe alternatives you've considered

PollOption class has avoters property, but that only indicates the number of voters of an option. By maintaining a hash table (or something like that) in the memory and updating it every time apoll_answer update was fetched, a bot could actually know the exact status of a poll (of course, the poll can't be an anonymous one).

This feature could be extremely useful if we need to create a weighted vote, where different voters have different weights according to the demand. (ex. deciding which movie to see tonight, and active users will have higher weights)

Additional context

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp