diff --git a/src/main/kotlin/command/Lolicon.kt b/src/main/kotlin/command/Lolicon.kt index 180aa15..4851ff5 100644 --- a/src/main/kotlin/command/Lolicon.kt +++ b/src/main/kotlin/command/Lolicon.kt @@ -345,7 +345,9 @@ object Lolicon : CompositeCommand( for (imageData in response.data) { when { imageData.urls.size > 1 -> { - imageMsgBuilder.add(contact.bot, PlainText(imageData.toReadable(imageData.urls))) + if(PluginConfig.verbose) { + imageMsgBuilder.add(contact.bot, PlainText(imageData.toReadable(imageData.urls))) + } for (url in imageData.urls.values) { runCatching { val stream = getImageInputStream(url) @@ -367,12 +369,16 @@ object Lolicon : CompositeCommand( runCatching { val stream = getImageInputStream(imageData.urls.values.first()) val image = contact.uploadImage(stream) - imageMsgBuilder.add(contact.bot, PlainText(imageData.toReadable(imageData.urls))) + if(PluginConfig.verbose) { + imageMsgBuilder.add(contact.bot, PlainText(imageData.toReadable(imageData.urls))) + } imageMsgBuilder.add(contact.bot, image) stream }.onFailure { logger.error(it) - imageMsgBuilder.add(contact.bot, PlainText(imageData.toReadable(imageData.urls))) + if(PluginConfig.verbose) { + imageMsgBuilder.add(contact.bot, PlainText(imageData.toReadable(imageData.urls))) + } imageMsgBuilder.add(contact.bot, PlainText(ReplyConfig.networkError)) }.onSuccess { runInterruptible(Dispatchers.IO) {