Class TdApi.AddBotMediaPreview

Enclosing class:
TdApi

public static class TdApi.AddBotMediaPreview extends TdApi.Function<TdApi.BotMediaPreview>
Adds a new media preview to the beginning of the list of media previews of a bot. Returns the added preview after addition is completed server-side. The total number of previews must not exceed getOption("bot_media_preview_count_max") for the given language.

Returns BotMediaPreview

  • Field Details

    • botUserId

      public long botUserId
      Identifier of the target bot. The bot must be owned and must have the main Web App.
    • languageCode

      public String languageCode
      A two-letter ISO 639-1 language code for which preview is added. If empty, then the preview will be shown to all users for whose languages there are no dedicated previews. If non-empty, then there must be an official language pack of the same name, which is returned by getLocalizationTargetInfo.
    • content

      public TdApi.InputStoryContent content
      Content of the added preview.
    • CONSTRUCTOR

      public static final int CONSTRUCTOR
      Identifier uniquely determining type of the object.
      See Also:
  • Constructor Details

    • AddBotMediaPreview

      public AddBotMediaPreview()
      Default constructor for a function, which adds a new media preview to the beginning of the list of media previews of a bot. Returns the added preview after addition is completed server-side. The total number of previews must not exceed getOption("bot_media_preview_count_max") for the given language.

      Returns BotMediaPreview

    • AddBotMediaPreview

      public AddBotMediaPreview(long botUserId, String languageCode, TdApi.InputStoryContent content)
      Creates a function, which adds a new media preview to the beginning of the list of media previews of a bot. Returns the added preview after addition is completed server-side. The total number of previews must not exceed getOption("bot_media_preview_count_max") for the given language.

      Returns BotMediaPreview

      Parameters:
      botUserId - Identifier of the target bot. The bot must be owned and must have the main Web App.
      languageCode - A two-letter ISO 639-1 language code for which preview is added. If empty, then the preview will be shown to all users for whose languages there are no dedicated previews. If non-empty, then there must be an official language pack of the same name, which is returned by getLocalizationTargetInfo.
      content - Content of the added preview.
  • Method Details

    • getConstructor

      public int getConstructor()
      Description copied from class: TdApi.Object
      Returns an identifier uniquely determining type of the object.
      Specified by:
      getConstructor in class TdApi.Object
      Returns:
      this.CONSTRUCTOR