use of org.javacord.core.util.FileContainer in project Javacord by BtoBastian.
the class EmbedBuilderDelegateImpl method setImage.
@Override
public void setImage(BufferedImage image, String fileType) {
imageUrl = null;
if (image == null) {
imageContainer = null;
} else {
imageContainer = new FileContainer(image, fileType);
imageContainer.setFileTypeOrName(UUID.randomUUID().toString() + "." + fileType);
}
}
use of org.javacord.core.util.FileContainer in project Javacord by BtoBastian.
the class EmbedBuilderDelegateImpl method setAuthor.
@Override
public void setAuthor(String name, String url, byte[] icon, String fileType) {
authorName = name;
authorUrl = url;
authorIconUrl = null;
if (icon == null) {
authorIconContainer = null;
} else {
authorIconContainer = new FileContainer(icon, fileType);
authorIconContainer.setFileTypeOrName(UUID.randomUUID().toString() + "." + fileType);
}
}
use of org.javacord.core.util.FileContainer in project Javacord by BtoBastian.
the class EmbedBuilderDelegateImpl method setThumbnail.
@Override
public void setThumbnail(BufferedImage thumbnail, String fileType) {
thumbnailUrl = null;
if (thumbnail == null) {
thumbnailContainer = null;
} else {
thumbnailContainer = new FileContainer(thumbnail, fileType);
thumbnailContainer.setFileTypeOrName(UUID.randomUUID().toString() + "." + fileType);
}
}
use of org.javacord.core.util.FileContainer in project Javacord by BtoBastian.
the class EmbedBuilderDelegateImpl method setFooter.
@Override
public void setFooter(String text, byte[] icon, String fileType) {
footerText = text;
footerIconUrl = null;
if (icon == null) {
footerIconContainer = null;
} else {
footerIconContainer = new FileContainer(icon, fileType);
footerIconContainer.setFileTypeOrName(UUID.randomUUID().toString() + "." + fileType);
}
}
use of org.javacord.core.util.FileContainer in project Javacord by BtoBastian.
the class EmbedBuilderDelegateImpl method setFooter.
@Override
public void setFooter(String text, File icon) {
footerText = text;
footerIconUrl = null;
if (icon == null) {
footerIconContainer = null;
} else {
footerIconContainer = new FileContainer(icon);
footerIconContainer.setFileTypeOrName(UUID.randomUUID().toString() + "." + FileUtils.getExtension(icon));
}
}
Aggregations