feat: add the cat command

This commit is contained in:
2024-10-08 15:08:27 +08:00
parent 97e62d5422
commit e4d6e683d3
5 files changed
+69 -1

No files matched your search

@@ -0,0 +1,19 @@
/*
* Copyright © 2024 RTAkland
* Author: RTAkland
* Date: 2024/10/8
*/
package cn.rtast.fancybot.util
import java.net.URI
import java.net.URL
fun String.toURL(): URL {
return URI(this).toURL()
}
fun String.toURI(): URI {
return URI(this)
}
@@ -45,4 +45,8 @@ fun Int.formatToMinutes(): String {
val minutes = this / 60
val remainingSeconds = this % 60
return "$minutes:${if (remainingSeconds < 10) "0" else ""}$remainingSeconds"
}
fun String.proxy(): String {
return this.replace("https://", "https://proxy.rtast.cn/https/")
}