Skip to content

Commit 833a5d6

Browse files
committed
build(deps): 更新 simbot 到 v3.1.0
1 parent 2d54cf6 commit 833a5d6

File tree

2 files changed

+27
-23
lines changed
  • buildSrc/src/main/kotlin
  • simbot-component-mirai-core/src/main/kotlin/love/forte/simbot/component/mirai/bot

2 files changed

+27
-23
lines changed

buildSrc/src/main/kotlin/P.kt

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,26 +17,10 @@ import love.forte.gradle.common.core.project.Version
1717
import love.forte.gradle.common.core.project.minus
1818
import love.forte.gradle.common.core.project.version
1919

20-
/*
21-
* Copyright (c) 2022-2023 ForteScarlet <ForteScarlet@163.com>
22-
*
23-
* 本文件是 simbot-component-mirai 的一部分。
24-
*
25-
* simbot-component-mirai 是自由软件:你可以再分发之和/或依照由自由软件基金会发布的 GNU 通用公共许可证修改之,无论是版本 3 许可证,还是(按你的决定)任何以后版都可以。
26-
*
27-
* 发布 simbot-component-mirai 是希望它能有用,但是并无保障;甚至连可销售和符合某个特定的目的都不保证。请参看 GNU 通用公共许可证,了解详情。
28-
*
29-
* 你应该随程序获得一份 GNU 通用公共许可证的复本。如果没有,请看:
30-
* https://www.gnu.org/licenses
31-
* https://www.gnu.org/licenses/gpl-3.0-standalone.html
32-
* https://www.gnu.org/licenses/lgpl-3.0-standalone.html
33-
*
34-
*/
35-
36-
val simbotVersionInfo = version(3, 0, 0) - version("RC", 3)
20+
val simbotVersionInfo = version(3, 1, 0) //- version("RC", 3)
3721

3822
@JvmField
39-
val SIMBOT_VERSION = simbotVersionInfo.toString() //"3.0.0-RC.2"
23+
val SIMBOT_VERSION = simbotVersionInfo.toString() //"3.1.0"
4024

4125
@JvmField
4226
val SIMBOT_CORE = "love.forte.simbot:simbot-core:$SIMBOT_VERSION"

simbot-component-mirai-core/src/main/kotlin/love/forte/simbot/component/mirai/bot/MiraiBot.kt

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,8 @@ import love.forte.simbot.bot.*
2121
import love.forte.simbot.component.mirai.*
2222
import love.forte.simbot.component.mirai.message.MiraiImage
2323
import love.forte.simbot.component.mirai.message.MiraiSendOnlyImage
24-
import love.forte.simbot.definition.FriendsContainer
25-
import love.forte.simbot.definition.GroupBot
26-
import love.forte.simbot.definition.Guild
27-
import love.forte.simbot.definition.UserInfo
24+
import love.forte.simbot.definition.*
25+
import love.forte.simbot.definition.SocialRelationsContainer.Companion.COUNT_NOT_SUPPORTED
2826
import love.forte.simbot.message.Image
2927
import love.forte.simbot.resources.Resource
3028
import love.forte.simbot.utils.item.Items
@@ -169,6 +167,15 @@ public interface MiraiBot : Bot, UserInfo, FriendsContainer, MiraiUserProfileQue
169167
// endregion
170168

171169
// region contacts api
170+
171+
/**
172+
* mirai 支持联系人 [contact][MiraiContact] 操作。
173+
* 在 mirai 组件中,联系人相当于好友 [friend][MiraiFriend]
174+
* 与陌生人 [stranger][MiraiStranger] 的汇总。
175+
*/
176+
override val isContactsSupported: Boolean
177+
get() = true
178+
172179
/**
173180
* 联系人数据序列。
174181
*
@@ -203,6 +210,12 @@ public interface MiraiBot : Bot, UserInfo, FriendsContainer, MiraiUserProfileQue
203210

204211
// region group apis
205212

213+
/**
214+
* mirai 组件中支持群 [group][MiraiGroup] 操作。
215+
*/
216+
override val isGroupsSupported: Boolean
217+
get() = true
218+
206219
/**
207220
* 获取当前Bot中的群组序列。
208221
*
@@ -228,6 +241,13 @@ public interface MiraiBot : Bot, UserInfo, FriendsContainer, MiraiUserProfileQue
228241

229242

230243
// region guild apis
244+
245+
/**
246+
* mirai 组件中没有频道 `guild` 。
247+
*/
248+
override val isGuildsSupported: Boolean
249+
get() = false
250+
231251
/**
232252
* mirai中不存在'频道(guild)'概念。
233253
*
@@ -246,7 +266,7 @@ public interface MiraiBot : Bot, UserInfo, FriendsContainer, MiraiUserProfileQue
246266
*/
247267
@Deprecated("Channel related APIs are not supported", ReplaceWith("0"))
248268
@JvmSynthetic
249-
override suspend fun guildCount(): Int = 0
269+
override suspend fun guildCount(): Int = COUNT_NOT_SUPPORTED
250270

251271

252272
/**

0 commit comments

Comments
 (0)