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:
223ID:
8EF8ECC0
- Parameters:
peer (
InputPeer) – Unique identifier of target chatid (
int32-bit) – Identifier of the sent messageuser_id (
InputUser) – User identifierscore (
int32-bit) – New scoreedit_message (
bool, optional) – Set this flag if the game message should be automatically edited to include the current scoreboardforce (
bool, optional) – Set this flag if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters
- Returns:
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_message →
true (optional)├── force →
true (optional)├── peer →
InputPeer│ ├──
InputPeerEmpty│ ├──
InputPeerSelf│ ├──
InputPeerChat│ │ └── chat_id →
long│ ├──
InputPeerUser│ │ ├── user_id →
long│ │ └── access_hash →
long│ ├──
InputPeerChannel│ │ ├── channel_id →
long│ │ └── access_hash →
long│ ├──
InputPeerUserFromMessage│ │ ├── peer →
InputPeer│ │ │ ├──
InputPeerEmpty│ │ │ ├──
InputPeerSelf│ │ │ ├──
InputPeerChat│ │ │ ├──
InputPeerUser│ │ │ ├──
InputPeerChannel│ │ │ ├──
InputPeerUserFromMessage│ │ │ └──
InputPeerChannelFromMessage│ │ ├── msg_id →
int│ │ └── user_id →
long│ ├── peer →
InputPeer│ │ ├──
InputPeerEmpty│ │ ├──
InputPeerSelf│ │ ├──
InputPeerChat│ │ ├──
InputPeerUser│ │ ├──
InputPeerChannel│ │ ├──
InputPeerUserFromMessage│ │ └──
InputPeerChannelFromMessage│ ├── msg_id →
int│ └── channel_id →
long├── id →
int├── 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 →
intExample
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,
)
)