Skip to content

Commit

Permalink
feat[onebot11]: impl file segment
Browse files Browse the repository at this point in the history
  • Loading branch information
RTAkland committed Dec 16, 2024
1 parent 3cfe6dd commit eed031a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,13 @@ data class ArrayMessage(
@SerializedName("emoji_package_id")
val emojiPackageId: String? = null,
val key: String? = null,
val large: String? = null
val large: String? = null,
@SerializedName("file_name")
val fileName: String? = null,
@SerializedName("file_hash")
val fileHash: String? = null,
@SerializedName("file_id")
val fileId: String? = null,
) {
fun getJSON() = this.data.toString()
fun getXML() = this.data.toString()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ data class FileEvent(
val id: String,
val name: String,
val size: Int,
val url: String
val url: String,
@SerializedName("busid")
val busId: Long,
)

override suspend fun saveTo(path: String) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ enum class ArrayMessageType {
at, rps, shake, poke, share,
reply, json, forward, dice,
video, contact, location,
music, xml, mface, node
music, xml, mface, node, file
}

0 comments on commit eed031a

Please sign in to comment.