SetGameScore

public struct SetGameScore : Codable, Equatable, TDFunction

Updates the game score of the specified user in the game; for bots only

  • Undocumented

    Declaration

    Swift

    public typealias Result = Message
  • The chat to which the message with the game belongs

    Declaration

    Swift

    public let chatId: Int53
  • Identifier of the message

    Declaration

    Swift

    public let messageId: Int53
  • True, if the message should be edited

    Declaration

    Swift

    public let editMessage: Bool
  • User identifier

    Declaration

    Swift

    public let userId: Int32
  • The new score

    Declaration

    Swift

    public let score: Int32
  • Pass true to update the score even if it decreases. If the score is 0, the user will be deleted from the high score table

    Declaration

    Swift

    public let force: Bool
  • Updates the game score of the specified user in the game; for bots only

    Declaration

    Swift

    public init(chatId: Int53, messageId: Int53, editMessage: Bool, userId: Int32, score: Int32, force: Bool)

    Parameters

    chatId

    The chat to which the message with the game belongs

    messageId

    Identifier of the message

    editMessage

    True, if the message should be edited

    userId

    User identifier

    score

    The new score

    force

    Pass true to update the score even if it decreases. If the score is 0, the user will be deleted from the high score table