Class ActivityAssets

java.lang.Object
de.jcm.discordgamesdk.activity.ActivityAssets

public class ActivityAssets extends Object

A structure used for images (assets) attached to activities.

Have a look at Discord's Rich Presence Visualizer for more clues:
https://discordapp.com/developers/applications/<your application id>/rich-presence/visualizer

See Also:
  • Constructor Details

    • ActivityAssets

      public ActivityAssets()
  • Method Details

    • setLargeImage

      public void setLargeImage(String assetKey)

      Sets the asset to be displayed as the large image.

      Upload assets at the Art Assets configuration page of your Discord application:
      https://discordapp.com/developers/applications/<your application id>/rich-presence/assets

      Parameters:
      assetKey - An asset key
    • getLargeImage

      public String getLargeImage()
      Gets the asset key of the large image.
      Returns:
      The asset key or an empty string if it is not set
    • setLargeText

      public void setLargeText(String text)

      Sets the tooltip text (displayed on hover) for the large image.

      Parameters:
      text - A text
    • getLargeText

      public String getLargeText()
      Gets the tooltip text for the large image.
      Returns:
      The tooltip text or an empty string if it is not set
    • setSmallImage

      public void setSmallImage(String assetKey)

      Sets the asset to be displayed as the small image.

      Upload assets at the Art Assets configuration page of your Discord application:
      https://discordapp.com/developers/applications/<your application id>/rich-presence/assets

      Parameters:
      assetKey - An asset key
    • getSmallImage

      public String getSmallImage()
      Gets the asset key of the small image.
      Returns:
      The asset key or an empty string if it is not set
    • setSmallText

      public void setSmallText(String text)

      Sets the tooltip text (displayed on hover) for the small image.

      Parameters:
      text - A text
    • getSmallText

      public String getSmallText()
      Gets the tooltip text for the small image.
      Returns:
      The tooltip text or an empty string if it is not set
    • toString

      public String toString()
      Overrides:
      toString in class Object