Skip to content

Commit

Permalink
我是个把continue写成break的sb
Browse files Browse the repository at this point in the history
  • Loading branch information
WYH2004-MC committed Jul 9, 2023
1 parent d1c350e commit 1fb80b0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/kotlin/event/MsgPreSendCensor.kt
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,16 @@ object MsgPreSendCensor : ListenerHost {
val lowerCaseMessage = message.toString().lowercase(Locale.getDefault())
if ((!DefaultConfig.QQWhiteList.contains(target.id) && !DefaultConfig.MessageWhiteList.any { lowerCaseMessage.contains(it.lowercase(Locale.getDefault())) }) || DefaultConfig.MessageBlackList.any { lowerCaseMessage.contains(it.lowercase(Locale.getDefault())) }){
for (msg in message.toMessageChain()) {
BotCensor.logger.info("msg: $msg")
var resultType = false
val result = when (msg) {
is PlainText -> AipCensor.textCensor(BotCensor.client,msg)
is Image -> {
if(DefaultConfig.ImageCensor){
AipCensor.imageCensor(BotCensor.client,msg)
}else break
}else continue
}
else -> break
else -> continue
}
try {
if (result.get("conclusion").equals("不合规")){
Expand Down

0 comments on commit 1fb80b0

Please sign in to comment.