Class ResolvedMediaImpl
java.lang.Object
net.dv8tion.jda.internal.components.ResolvedMediaImpl
- All Implemented Interfaces:
ResolvedMedia
-
Constructor Summary
ConstructorsConstructorDescriptionResolvedMediaImpl
(String attachmentId, String url, String proxyUrl, int width, int height, String contentType) ResolvedMediaImpl
(DataObject data) -
Method Summary
Modifier and TypeMethodDescriptionboolean
The ID of the attachment represented by this resolved media, may returnnull
if this media was created from an external link.The media type, if available, ornull
.int
The height of this media, if available, or0
.getProxy()
AnAttachmentProxy
for this media.The URL of this media, proxied by Discord's CDN.getUrl()
The URL of this media, for locally-uploaded files, this will always be a URL from Discord's CDN, in other cases it may be an external URL.int
getWidth()
The width of this media, if available, or0
.int
hashCode()
toString()
Methods inherited from interface net.dv8tion.jda.api.components.ResolvedMedia
getAttachmentIdLong
-
Constructor Details
-
ResolvedMediaImpl
-
ResolvedMediaImpl
-
-
Method Details
-
getAttachmentId
Description copied from interface:ResolvedMedia
The ID of the attachment represented by this resolved media, may returnnull
if this media was created from an external link.- Specified by:
getAttachmentId
in interfaceResolvedMedia
- Returns:
- The ID of the attachment, or
null
-
getUrl
Description copied from interface:ResolvedMedia
The URL of this media, for locally-uploaded files, this will always be a URL from Discord's CDN, in other cases it may be an external URL.If you want to download the file, you should use
ResolvedMedia.getProxy()
.- Specified by:
getUrl
in interfaceResolvedMedia
- Returns:
- The URL of this media
-
getProxyUrl
Description copied from interface:ResolvedMedia
The URL of this media, proxied by Discord's CDN.This URL may be invalid if the media failed to load.
If you want to download the file, you should use
ResolvedMedia.getProxy()
.- Specified by:
getProxyUrl
in interfaceResolvedMedia
- Returns:
- The proxy URL of this media
-
getProxy
Description copied from interface:ResolvedMedia
AnAttachmentProxy
for this media.
This allows you to easily download the media.This proxy may not be usable if the media failed to load.
- Specified by:
getProxy
in interfaceResolvedMedia
- Returns:
- The
AttachmentProxy
of this media
-
getWidth
public int getWidth()Description copied from interface:ResolvedMedia
The width of this media, if available, or0
.This may be
0
if the media failed to load.- Specified by:
getWidth
in interfaceResolvedMedia
- Returns:
- Width of this media, or
0
-
getHeight
public int getHeight()Description copied from interface:ResolvedMedia
The height of this media, if available, or0
.This may be
0
if the media failed to load.- Specified by:
getHeight
in interfaceResolvedMedia
- Returns:
- Height of this media, or
0
-
getContentType
Description copied from interface:ResolvedMedia
- Specified by:
getContentType
in interfaceResolvedMedia
- Returns:
- The media type, or
null
-
equals
-
hashCode
public int hashCode() -
toString
-