1
0
mirror of https://github.com/mamoe/mirai.git synced 2025-04-25 04:50:26 +08:00

Remove parentheses in mirai code of VipFace

This commit is contained in:
Him188 2020-06-12 16:02:09 +08:00
parent d2602cb97f
commit 7583172976
2 changed files with 2 additions and 2 deletions
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/data
mirai-serialization/src/commonMain/kotlin/net/mamoe/mirai/message/code/internal

View File

@ -166,7 +166,7 @@ data class VipFace internal constructor(
val name: String
) {
override fun toString(): String {
return "($id,$name)"
return "$id,$name"
}
}

View File

@ -65,7 +65,7 @@ internal object MiraiCodeParsers : Map<String, MiraiCodeParser> by mapOf(
"poke" to MiraiCodeParser(Regex("(.*)?,(\\d*),(-?\\d*)")) { (name, type, id) ->
PokeMessage(name, type.toInt(), id.toInt())
},
"vipface" to MiraiCodeParser(Regex("""\((\d*),(.*)\),(\d*)""")) { (id, name, count) ->
"vipface" to MiraiCodeParser(Regex("""(\d*),(.*),(\d*)""")) { (id, name, count) ->
VipFace(VipFace.Kind(id.toInt(), name), count.toInt())
},
"face" to MiraiCodeParser(Regex("""(\d*)""")) { (id) ->