Class TdApi.TranslateMessageText

Enclosing class:
TdApi

public static class TdApi.TranslateMessageText extends TdApi.Function<TdApi.FormattedText>
Extracts text or caption of the given message and translates it to the given language; must not be used in secret chats. If the current user is a Telegram Premium user, then text formatting is preserved.

Returns FormattedText

  • Nested Class Summary

    Nested classes/interfaces inherited from class org.drinkless.tdlib.TdApi.Function

    TdApi.Function.Constructors
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    long
    Identifier of the chat to which the message belongs.
    static final int
    Identifier uniquely determining type of the object.
    long
    Identifier of the message.
    Language code of the language to which the message is translated.
    Tone of the translation; see translateText.tone for the list of supported values.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor for a function, which extracts text or caption of the given message and translates it to the given language; must not be used in secret chats.
    TranslateMessageText(long chatId, long messageId, String toLanguageCode, String tone)
    Creates a function, which extracts text or caption of the given message and translates it to the given language; must not be used in secret chats.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns an identifier uniquely determining type of the object.

    Methods inherited from class org.drinkless.tdlib.TdApi.Function

    toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • chatId

      public long chatId
      Identifier of the chat to which the message belongs.
    • messageId

      public long messageId
      Identifier of the message.
    • toLanguageCode

      public String toLanguageCode
      Language code of the language to which the message is translated. See translateText.toLanguageCode for the list of supported values.
    • tone

      public String tone
      Tone of the translation; see translateText.tone for the list of supported values.
    • CONSTRUCTOR

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

    • TranslateMessageText

      public TranslateMessageText()
      Default constructor for a function, which extracts text or caption of the given message and translates it to the given language; must not be used in secret chats. If the current user is a Telegram Premium user, then text formatting is preserved.

      Returns FormattedText

    • TranslateMessageText

      public TranslateMessageText(long chatId, long messageId, String toLanguageCode, String tone)
      Creates a function, which extracts text or caption of the given message and translates it to the given language; must not be used in secret chats. If the current user is a Telegram Premium user, then text formatting is preserved.

      Returns FormattedText

      Parameters:
      chatId - Identifier of the chat to which the message belongs.
      messageId - Identifier of the message.
      toLanguageCode - Language code of the language to which the message is translated. See translateText.toLanguageCode for the list of supported values.
      tone - Tone of the translation; see translateText.tone for the list of supported values.
  • Method Details