diff --git a/src/main/kotlin/net/taehui/twilight/qwilight/QwilightAvatar.kt b/src/main/kotlin/net/taehui/twilight/qwilight/QwilightAvatar.kt index 507044f..5d7b226 100644 --- a/src/main/kotlin/net/taehui/twilight/qwilight/QwilightAvatar.kt +++ b/src/main/kotlin/net/taehui/twilight/qwilight/QwilightAvatar.kt @@ -834,11 +834,25 @@ ) else null val comment = CommentOuterClass.Comment.parseFrom(commentFileContents) - val commentFileData = commentFileContents.toByteArray() - val commentIDNew = Utility.getID512(commentFileData) val isBand1 = comment.lowestJudgment == 0 val lowestAudioMultiplier = comment.audioMultipliersList.map { it.audioMultiplier } .plus(audioMultiplier).min() + DB.saveHandled( + avatarID, + targetComputing.noteID, + isBand1, + point == 1.0, + autoMode, + judgmentMode, + hitPointsMode, + longNoteMode, + inputFavorMode, + noteModifyMode, + lowestAudioMultiplier + ) + + val commentFileData = commentFileContents.toByteArray() + val commentIDNew = Utility.getID512(commentFileData) val commentID = DB.saveComment( multiplier, autoMode, @@ -925,20 +939,6 @@ } } - DB.saveHandled( - avatarID, - targetComputing.noteID, - isBand1, - point == 1.0, - autoMode, - judgmentMode, - hitPointsMode, - longNoteMode, - inputFavorMode, - noteModifyMode, - lowestAudioMultiplier - ) - if (SiteHandler.hasAvatar(this, SiteHandler.commentSiteID)) { SiteHandler.putSiteYell( SiteHandler.commentSiteID, diff --git a/src/main/kotlin/net/taehui/twilight/system/PlatformSystem.kt b/src/main/kotlin/net/taehui/twilight/system/PlatformSystem.kt index f7f0d91..b49876b 100644 --- a/src/main/kotlin/net/taehui/twilight/system/PlatformSystem.kt +++ b/src/main/kotlin/net/taehui/twilight/system/PlatformSystem.kt @@ -210,12 +210,7 @@ qwilightPlatform = platform?.getGuildById(platformClient.qwilight) - qwilightPlatform?.retrieveCommands()?.queue { data -> - data.forEach { - qwilightPlatform?.deleteCommandById(it.idLong)?.queue() - } - qwilightPlatform?.upsertCommand("login", "Log in to Qwilight Channel")?.queue() - } + qwilightPlatform?.upsertCommand("login", "Log in to Qwilight Channel")?.queue() doCallPlatformAvatars()