File tree Expand file tree Collapse file tree 4 files changed +12
-6
lines changed Expand file tree Collapse file tree 4 files changed +12
-6
lines changed Original file line number Diff line number Diff line change 1
1
# mirai-console-lolicon
2
+
2
3
[ ![ GitHub top language] ( https://img.shields.io/github/languages/top/Samarium150/mirai-console-lolicon?style=flat )] ( https://kotlinlang.org/ )
3
4
[ ![ Gradle CI] ( https://github.com/Samarium150/mirai-console-lolicon/workflows/Gradle%20CI/badge.svg?branch=master )] ( https://github.com/Samarium150/mirai-console-lolicon/actions?query=workflow%3A%22Gradle+CI%22 )
4
5
[ ![ GitHub] ( https://img.shields.io/github/license/Samarium150/mirai-console-lolicon?style=flat )] ( https://github.com/Samarium150/mirai-console-lolicon/blob/master/LICENSE )
8
9
9
10
受 [ ACGPro] ( https://github.com/ShrBox/ACGPro ) 启发而写
10
11
11
- Social preview的图片来自 [ AliceSoft] ( https://www.alicesoft.com ) 制作的游戏 [ ドーナドーナ いっしょにわるいことをしよう] ( https://www.alicesoft.com/dohnadohna )
12
+ Social preview的图片来自 [ AliceSoft] ( https://www.alicesoft.com )
13
+ 制作的游戏 [ ドーナドーナ いっしょにわるいことをしよう] ( https://www.alicesoft.com/dohnadohna )
12
14
13
15
在群内随机发送来自 [ Lolicon API v2] ( https://api.lolicon.app/#/setu ) 的图片(默认30s自动撤回+60s冷却),支持标签检索和JSON高级检索
14
16
15
- 适配 [ mirai-console] ( https://github.com/mamoe/mirai-console ) [ ![ Version] ( https://img.shields.io/badge/version-2.10.2 -blue )] ( https://github.com/mamoe/mirai/releases/tag/v2.10.2 )
17
+ 适配 [ mirai-console] ( https://github.com/mamoe/mirai-console ) [ ![ Version] ( https://img.shields.io/badge/version-2.12.1 -blue )] ( https://github.com/mamoe/mirai/releases/tag/v2.12.1 )
16
18
17
19
使用文档已经移到了 [ Wiki] ( https://github.com/Samarium150/mirai-console-lolicon/wiki ) 页面
18
20
Original file line number Diff line number Diff line change @@ -5,12 +5,12 @@ plugins {
5
5
kotlin(" jvm" ) version kotlinVersion
6
6
kotlin(" plugin.serialization" ) version kotlinVersion
7
7
8
- id(" net.mamoe.mirai-console" ) version " 2.12.0 "
8
+ id(" net.mamoe.mirai-console" ) version " 2.12.1 "
9
9
id(" com.geoffgranum.gradle-conventional-changelog" ) version " +"
10
10
}
11
11
12
12
group = " io.github.samarium150"
13
- version = " 6.0.0 "
13
+ version = " 6.0.1 "
14
14
15
15
repositories {
16
16
mavenCentral()
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ import java.net.Proxy
35
35
object MiraiConsoleLolicon : KotlinPlugin(
36
36
JvmPluginDescription (
37
37
id = "io.github.samarium150.mirai.plugin.mirai-console-lolicon",
38
- version = "6.0.0 ",
38
+ version = "6.0.1 ",
39
39
name = "Lolicon "
40
40
) {
41
41
author("Samarium150 ")
Original file line number Diff line number Diff line change @@ -182,6 +182,7 @@ object Lolicon : CompositeCommand(
182
182
}
183
183
}
184
184
}
185
+
185
186
imageData.urls.size == 1 -> {
186
187
runCatching {
187
188
val stream = getImageInputStream(imageData.urls.values.first())
@@ -199,6 +200,7 @@ object Lolicon : CompositeCommand(
199
200
}
200
201
}
201
202
}
203
+
202
204
else -> {
203
205
continue
204
206
}
@@ -241,6 +243,7 @@ object Lolicon : CompositeCommand(
241
243
}
242
244
}
243
245
}
246
+
244
247
imageData.urls.size == 1 -> runCatching {
245
248
val stream = getImageInputStream(imageData.urls.values.first())
246
249
val image = subject?.uploadImage(stream)
@@ -260,6 +263,7 @@ object Lolicon : CompositeCommand(
260
263
it.close()
261
264
}
262
265
}
266
+
263
267
else -> {
264
268
continue
265
269
}
@@ -287,7 +291,7 @@ object Lolicon : CompositeCommand(
287
291
@SubCommand(" set" , " 设置" )
288
292
@Description(" 设置属性, 详见帮助信息" )
289
293
suspend fun CommandSenderOnMessage<MessageEvent>.set (property : PluginData .Property , value : Int ) {
290
- if (fromEvent !is GroupMessageEvent || fromEvent !is FriendMessageEvent )
294
+ if (fromEvent !is GroupMessageEvent && fromEvent !is FriendMessageEvent )
291
295
return
292
296
if (fromEvent is GroupMessageEvent && ! (fromEvent as GroupMessageEvent ).sender.isOperator()) {
293
297
sendMessage(ReplyConfig .nonAdminPermissionDenied)
You can’t perform that action at this time.
0 commit comments