mirai-core / net.mamoe.mirai.utils / java.net.URL

Extensions for java.net.URL

suspendToExternalImage

IO 中进行 URL.toExternalImage

suspend fun URL.suspendToExternalImage(): ExternalImage

toExternalImage

下载文件到临时目录然后调用 File.toExternalImage

fun URL.toExternalImage(): ExternalImage