Update mirai code parser for new At

This commit is contained in:
Him188 2020-12-16 19:16:14 +08:00
parent 6c0b6473ed
commit 03f8cc9713

View File

@ -59,8 +59,8 @@ internal inline fun String.forEachMiraiCode(crossinline block: (origin: String,
}
internal object MiraiCodeParsers : Map<String, MiraiCodeParser> by mapOf(
"at" to MiraiCodeParser(Regex("""(\d*),(.*)""")) { (target, display) ->
At._lowLevelConstructAtInstance(target.toLong(), display)
"at" to MiraiCodeParser(Regex("""(\d*)""")) { (target, _) ->
At(target.toLong())
},
"atall" to MiraiCodeParser(Regex("")) {
AtAll