[Review] MessageSelectBuilder: remove dark magics

This commit is contained in:
Him188 2021-01-08 09:51:42 +08:00
parent 70633a631a
commit f31fbafd02

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 Mamoe Technologies and contributors. * Copyright 2019-2021 Mamoe Technologies and contributors.
* *
* 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证.
* Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link.
@ -149,22 +149,6 @@ public abstract class MessageSelectBuilder<M : MessageEvent, R> @PublishedApi in
@Deprecated("Using `reply` DSL in message selection is prohibited", level = DeprecationLevel.HIDDEN) @Deprecated("Using `reply` DSL in message selection is prohibited", level = DeprecationLevel.HIDDEN)
override infix fun MessageSelectionTimeoutChecker.reply(message: Message): Nothing = error("prohibited") override infix fun MessageSelectionTimeoutChecker.reply(message: Message): Nothing = error("prohibited")
@JvmName("reply3")
@Suppress(
"INAPPLICABLE_JVM_NAME", "unused", "UNCHECKED_CAST",
"INVALID_CHARACTERS", "NAME_CONTAINS_ILLEGAL_CHARS", "FunctionName"
)
@Deprecated("Using `reply` DSL in message selection is prohibited", level = DeprecationLevel.HIDDEN)
override infix fun MessageSelectionTimeoutChecker.`->`(message: String): Nothing = error("prohibited")
@JvmName("reply3")
@Suppress(
"INAPPLICABLE_JVM_NAME", "unused", "UNCHECKED_CAST",
"INVALID_CHARACTERS", "NAME_CONTAINS_ILLEGAL_CHARS", "FunctionName"
)
@Deprecated("Using `reply` DSL in message selection is prohibited", level = DeprecationLevel.HIDDEN)
override infix fun MessageSelectionTimeoutChecker.`->`(message: Message): Nothing = error("prohibited")
@Deprecated("Using `reply` DSL in message selection is prohibited", level = DeprecationLevel.HIDDEN) @Deprecated("Using `reply` DSL in message selection is prohibited", level = DeprecationLevel.HIDDEN)
override infix fun MessageSelectionTimeoutChecker.quoteReply(block: suspend () -> Any?): Nothing = override infix fun MessageSelectionTimeoutChecker.quoteReply(block: suspend () -> Any?): Nothing =
error("prohibited") error("prohibited")
@ -330,24 +314,6 @@ public abstract class MessageSelectBuilderUnit<M : MessageEvent, R> @PublishedAp
} }
} }
@JvmName("reply3")
@Suppress(
"INAPPLICABLE_JVM_NAME", "unused", "UNCHECKED_CAST",
"INVALID_CHARACTERS", "NAME_CONTAINS_ILLEGAL_CHARS", "FunctionName"
)
public open infix fun MessageSelectionTimeoutChecker.`->`(message: Message) {
return this.reply(message)
}
@JvmName("reply3")
@Suppress(
"INAPPLICABLE_JVM_NAME", "unused", "UNCHECKED_CAST",
"INVALID_CHARACTERS", "NAME_CONTAINS_ILLEGAL_CHARS", "FunctionName"
)
public open infix fun MessageSelectionTimeoutChecker.`->`(message: String) {
return this.reply(message)
}
/** /**
* 在超时后引用回复原消息 * 在超时后引用回复原消息
* *