SetInlineGameScoreRequest
Only bots can use this request. See code examples.
---functions--- messages.setInlineGameScore#15ad9f64 flags:# edit_message:flags.0?true force:flags.1?true id:InputBotInlineMessageID user_id:InputUser score:int = Bool
Returns
Bool |
This type has no instances available.
Parameters
id | InputBotInlineMessageID | |
user_id | InputUser | Anything entity-like will work if the library can find its Input version (e.g., usernames, Peer , User or Channel objects, etc.). |
score | int | |
edit_message | flag | This argument defaults to None and can be omitted. |
force | flag | This argument defaults to None and can be omitted. |
Known RPC errors
This request can cause 2 known errors:
MessageIdInvalidError | The specified message ID is invalid or you can't do that operation on such message. |
UserBotRequiredError | This method can only be called by a bot. |
You can import these from telethon.errors
.
Example
from telethon.sync import TelegramClient from telethon import functions, types with TelegramClient(name, api_id, api_hash) as client: result = client(functions.messages.SetInlineGameScoreRequest( id=types.InputBotInlineMessageID( dc_id=42, id=-12398745604826, access_hash=-12398745604826 ), user_id='username', score=42, edit_message=True, force=True )) print(result)