messages.SetInlineGameScore

class pyrogram.raw.functions.messages.SetInlineGameScore

Use this method to set the score of the specified user in a game sent as an inline message (bots only).

Details:
  • Layer: 227

  • ID: 15AD9F64

Parameters:
  • id (InputBotInlineMessageID) – ID of the inline message

  • user_id (InputUser) – User identifier

  • score (int 32-bit) – New score

  • edit_message (bool, optional) – Set this flag if the game message should be automatically edited to include the current scoreboard

  • force (bool, optional) – Set this flag if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters

Returns:

bool

TL Schema

messages.setInlineGameScore#15ad9f64
flags:#
edit_message:flags.0?true
force:flags.1?true
id:InputBotInlineMessageID
user_id:InputUser
score:int

= Bool

Parameter Tree

SetInlineGameScore
├── edit_message → true (optional)
├── force → true (optional)
├── id → InputBotInlineMessageID
│ │ ├── dc_id → int
│ │ ├── id → long
│ │ └── access_hash → long
│ ├── dc_id → int
│ ├── owner_id → long
│ ├── id → int
│ └── access_hash → long
├── user_id → InputUser
│ ├── InputUserEmpty
│ ├── InputUserSelf
│ ├── InputUser
│ │ ├── user_id → long
│ │ └── access_hash → long
│ └── InputUserFromMessage
│ ├── peer → InputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ ├── msg_id → int
│ └── user_id → long
└── score → int

Example

await app.invoke(
    SetInlineGameScore(
        edit_message=None,
        force=None,
        id=InputBotInlineMessageID(
            dc_id=0,
            id=0,
            access_hash=0
        ),
        user_id=await app.resolve_user(chat_id),
        score=0,
    )
)