UserType

public indirect enum UserType : Codable, Equatable, FunctionResult, TDEnum, EquatableEnum

Represents the type of a user. The following types are possible: regular users, deleted users and bots

  • A regular user

    Declaration

    Swift

    case regular
  • A deleted user or deleted bot. No information on the user besides the user identifier is available. It is not possible to perform any active actions on this type of user

    Declaration

    Swift

    case deleted
  • A bot (see https://core.telegram.org/bots)

    • canJoinGroups: True, if the bot can be invited to basic group and supergroup chats
    • canReadAllGroupMessages: True, if the bot can read all messages in basic group or supergroup chats and not just those addressed to the bot. In private and channel chats a bot can always read all messages
    • isInline: True, if the bot supports inline queries
    • inlineQueryPlaceholder: Placeholder for inline queries (displayed on the client input field)
    • needLocation: True, if the location of the user should be sent with every inline query to this bot

    Declaration

    Swift

    case bot(canJoinGroups: Bool, canReadAllGroupMessages: Bool, isInline: Bool, inlineQueryPlaceholder: String, needLocation: Bool)
  • No information on the user besides the user identifier is available, yet this user has not been deleted. This object is extremely rare and must be handled like a deleted user. It is not possible to perform any actions on users of this type

    Declaration

    Swift

    case unknown