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: 223

  • 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_messagetrue (optional)
├── forcetrue (optional)
├── idInputBotInlineMessageID
│ │ ├── dc_idint
│ │ ├── idlong
│ │ └── access_hashlong
│ ├── dc_idint
│ ├── owner_idlong
│ ├── idint
│ └── access_hashlong
├── user_idInputUser
│ ├── InputUserEmpty
│ ├── InputUserSelf
│ ├── InputUser
│ │ ├── user_idlong
│ │ └── access_hashlong
│ └── InputUserFromMessage
│ ├── peerInputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ ├── msg_idint
│ └── user_idlong
└── scoreint

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,
    )
)