Skip to content

Commit e785798

Browse files
committed
refactor(api): rename KookChannelUpdator to KookChannelUpdater for consistency
1 parent 49dfaa9 commit e785798

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

simbot-component-kook-core/src/commonMain/kotlin/love/forte/simbot/component/kook/KookChannel.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,11 @@ public interface KookChannel : Channel, DeleteSupport {
150150

151151
/**
152152
* 获取一个频道更新器。
153-
* 提供需要修改的内容,然后使用 [KookChannelUpdator.execute] 更新频道数据。
153+
* 提供需要修改的内容,然后使用 [KookChannelUpdater.execute] 更新频道数据。
154154
*
155155
* @since 4.3.0
156156
*/
157-
public fun updator(): KookChannelUpdator
157+
public fun updater(): KookChannelUpdater
158158
}
159159

160160
/**
@@ -168,8 +168,8 @@ public val KookChannel.slowModeDuration: Duration
168168
}
169169

170170
/**
171-
* 使用 DSL 直接配置 [KookChannelUpdator.builder] 并更新频道信息。
171+
* 使用 DSL 直接配置 [KookChannelUpdater.builder] 并更新频道信息。
172172
* @since 4.3.0
173173
*/
174174
public suspend inline fun KookChannel.update(block: UpdateChannelApi.Builder.() -> Unit): KookChannel =
175-
updator().apply { builder.block() }.execute()
175+
updater().apply { builder.block() }.execute()
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import love.forte.simbot.suspendrunner.ST
2828
* [KookChannel] 的更新器。
2929
* @since 4.3.0
3030
*/
31-
public interface KookChannelUpdator {
31+
public interface KookChannelUpdater {
3232
public val channel: KookChannel
3333

3434
/**
@@ -39,7 +39,7 @@ public interface KookChannelUpdator {
3939
/**
4040
* 使用当前的 [builder] 在DSL中配置更新信息。
4141
*/
42-
public fun applyBuilder(block: UpdateChannelApi.Builder.() -> UpdateChannelApi.Builder): KookChannelUpdator =
42+
public fun applyBuilder(block: UpdateChannelApi.Builder.() -> UpdateChannelApi.Builder): KookChannelUpdater =
4343
apply {
4444
builder = builder.block()
4545
}

simbot-component-kook-core/src/commonMain/kotlin/love/forte/simbot/component/kook/internal/AbstractKookChatCapableChannelImpl.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import love.forte.simbot.ability.DeleteOption
2424
import love.forte.simbot.common.id.ID
2525
import love.forte.simbot.common.id.literal
2626
import love.forte.simbot.component.kook.KookCategory
27-
import love.forte.simbot.component.kook.KookChannelUpdator
27+
import love.forte.simbot.component.kook.KookChannelUpdater
2828
import love.forte.simbot.component.kook.KookChatCapableChannel
2929
import love.forte.simbot.component.kook.bot.internal.KookBotImpl
3030
import love.forte.simbot.component.kook.message.KookChannelMessageDetailsContent
@@ -70,7 +70,7 @@ internal abstract class AbstractKookChatCapableChannelImpl(
7070
bot.deleteChannel(source.id, options)
7171
}
7272

73-
override fun updator(): KookChannelUpdator = KookChannelUpdatorImpl(this, bot)
73+
override fun updater(): KookChannelUpdater = KookChannelUpdaterImpl(this, bot)
7474
}
7575

7676
internal suspend fun KookChatCapableChannel.send(

simbot-component-kook-core/src/commonMain/kotlin/love/forte/simbot/component/kook/internal/KookCategoryChannelImpl.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ package love.forte.simbot.component.kook.internal
2323
import love.forte.simbot.ability.DeleteOption
2424
import love.forte.simbot.component.kook.KookCategory
2525
import love.forte.simbot.component.kook.KookCategoryChannel
26-
import love.forte.simbot.component.kook.KookChannelUpdator
26+
import love.forte.simbot.component.kook.KookChannelUpdater
2727
import love.forte.simbot.component.kook.bot.internal.KookBotImpl
2828
import love.forte.simbot.kook.objects.Channel
2929
import kotlin.coroutines.CoroutineContext
@@ -56,7 +56,7 @@ internal class KookCategoryChannelImpl(
5656
bot.deleteChannel(source.id, options)
5757
}
5858

59-
override fun updator(): KookChannelUpdator = KookChannelUpdatorImpl(this, bot)
59+
override fun updater(): KookChannelUpdater = KookChannelUpdaterImpl(this, bot)
6060

6161
override fun toString(): String {
6262
return "KookCategoryChannel(id=${source.id}, name=${source.name})"
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ package love.forte.simbot.component.kook.internal
2222

2323
import love.forte.simbot.common.id.literal
2424
import love.forte.simbot.component.kook.KookChannel
25-
import love.forte.simbot.component.kook.KookChannelUpdator
25+
import love.forte.simbot.component.kook.KookChannelUpdater
2626
import love.forte.simbot.component.kook.bot.internal.KookBotImpl
2727
import love.forte.simbot.component.kook.util.requestDataBy
2828
import love.forte.simbot.kook.api.channel.UpdateChannelApi
@@ -31,8 +31,8 @@ import love.forte.simbot.kook.api.channel.toChannel
3131
/**
3232
* @author ForteScarlet
3333
*/
34-
internal class KookChannelUpdatorImpl(override val channel: KookChannel, private val bot: KookBotImpl) :
35-
KookChannelUpdator {
34+
internal class KookChannelUpdaterImpl(override val channel: KookChannel, private val bot: KookBotImpl) :
35+
KookChannelUpdater {
3636
override var builder: UpdateChannelApi.Builder = UpdateChannelApi.builder(channel.id.literal)
3737

3838
override suspend fun execute(): KookChannel {

0 commit comments

Comments
 (0)