messages.SetGameScore

class pyrogram.raw.functions.messages.SetGameScore

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

Details:
  • Layer: 223

  • ID: 8EF8ECC0

Parameters:
  • peer (InputPeer) – Unique identifier of target chat

  • id (int 32-bit) – Identifier of the sent 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:

Updates

TL Schema

messages.setGameScore#8ef8ecc0
flags:#
edit_message:flags.0?true
force:flags.1?true
peer:InputPeer
id:int
user_id:InputUser
score:int

= Updates

Parameter Tree

SetGameScore
├── edit_messagetrue (optional)
├── forcetrue (optional)
├── peerInputPeer
│ ├── InputPeerEmpty
│ ├── InputPeerSelf
│ ├── InputPeerChat
│ │ └── chat_idlong
│ ├── InputPeerUser
│ │ ├── user_idlong
│ │ └── access_hashlong
│ ├── InputPeerChannel
│ │ ├── channel_idlong
│ │ └── access_hashlong
│ │ ├── peerInputPeer
│ │ │ ├── InputPeerEmpty
│ │ │ ├── InputPeerSelf
│ │ │ ├── InputPeerChat
│ │ │ ├── InputPeerUser
│ │ │ ├── InputPeerChannel
│ │ │ ├── InputPeerUserFromMessage
│ │ │ └── InputPeerChannelFromMessage
│ │ ├── msg_idint
│ │ └── user_idlong
│ ├── peerInputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ ├── msg_idint
│ └── channel_idlong
├── idint
├── 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(
    SetGameScore(
        edit_message=None,
        force=None,
        peer=await app.resolve_peer(chat_id),
        id=0,
        user_id=await app.resolve_user(chat_id),
        score=0,
    )
)