1
0
mirror of https://github.com/mamoe/mirai.git synced 2025-04-05 07:10:11 +08:00

[core+console] Raise deprecation level for 2.13: ()

- warningSince 2.11 -> errorSince 2.13
 - errorSince 2.12 -> hiddenSince 2.13
 - some experimental APIs removed
This commit is contained in:
Him188 2022-08-27 14:06:03 +08:00 committed by GitHub
parent f4db93745d
commit 2d393ee0b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
20 changed files with 155 additions and 181 deletions

View File

@ -41,8 +41,8 @@ import net.mamoe.mirai.utils.DeprecatedSinceMirai
@Deprecated(
"请使用 JavaAutoSavePluginConfig",
replaceWith = ReplaceWith("JavaAutoSavePluginConfig", "net.mamoe.mirai.console.data.java.JavaAutoSavePluginConfig"),
level = DeprecationLevel.WARNING
level = DeprecationLevel.ERROR
)
@DeprecatedSinceMirai(warningSince = "2.11")
@DeprecatedSinceMirai(warningSince = "2.11", errorSince = "2.13")
public abstract class JAutoSavePluginConfig public constructor(saveName: String) : AutoSavePluginConfig(saveName),
PluginConfig

View File

@ -73,9 +73,9 @@ import kotlin.reflect.full.createType
@Deprecated(
"请使用 JavaAutoSavePluginData",
replaceWith = ReplaceWith("JavaAutoSavePluginData", "net.mamoe.mirai.console.data.java.JavaAutoSavePluginData"),
level = DeprecationLevel.WARNING
level = DeprecationLevel.ERROR
)
@DeprecatedSinceMirai(warningSince = "2.11")
@DeprecatedSinceMirai(warningSince = "2.11", errorSince = "2.13")
public abstract class JAutoSavePluginData public constructor(saveName: String) : AutoSavePluginData(saveName),
PluginConfig {

View File

@ -63,8 +63,12 @@ public interface FunctionExtension : Extension
*
* @see PermissionServiceProvider
*/
@Deprecated("Please use InstanceExtension instead.", replaceWith = ReplaceWith("InstanceExtension"))
@DeprecatedSinceMirai(warningSince = "2.11")
@Deprecated(
"Please use InstanceExtension instead.",
replaceWith = ReplaceWith("InstanceExtension"),
level = DeprecationLevel.ERROR
)
@DeprecatedSinceMirai(warningSince = "2.11", errorSince = "2.13")
public interface SingletonExtension<T> : Extension {
public val instance: T
}

View File

@ -38,9 +38,13 @@ public abstract class AbstractExtensionPoint<T : Extension>(
/**
* 表示一个 [SingletonExtension] [ExtensionPoint]
*/
@Suppress("DEPRECATION")
@Deprecated("Please use InstanceExtensionPoint instead.", replaceWith = ReplaceWith("InstanceExtensionPoint"))
@DeprecatedSinceMirai(warningSince = "2.11")
@Suppress("DEPRECATION_ERROR")
@Deprecated(
"Please use InstanceExtensionPoint instead.",
replaceWith = ReplaceWith("InstanceExtensionPoint"),
level = DeprecationLevel.ERROR
)
@DeprecatedSinceMirai(warningSince = "2.11", errorSince = "2.13")
public interface SingletonExtensionPoint<T : SingletonExtension<*>> : ExtensionPoint<T>
/**
@ -68,10 +72,11 @@ public constructor(
replaceWith = ReplaceWith(
"AbstractInstanceExtension",
"net.mamoe.mirai.console.extension.AbstractInstanceExtensionPoint"
)
),
level = DeprecationLevel.ERROR
)
@DeprecatedSinceMirai(warningSince = "2.11")
@Suppress("DEPRECATION")
@DeprecatedSinceMirai(warningSince = "2.11", errorSince = "2.13")
@Suppress("DEPRECATION", "DEPRECATION_ERROR")
public abstract class AbstractSingletonExtensionPoint<E : SingletonExtension<T>, T>
/**
* @since 2.10

View File

@ -58,16 +58,15 @@ public class PluginComponentStorage(
///////////////////////////////////////////////////////////////////////////
/** 注册一个 [SingletonExtensionSelector] */
@Suppress("DeprecatedCallableAddReplaceWith", "DEPRECATION")
@Suppress("DeprecatedCallableAddReplaceWith", "DEPRECATION_ERROR")
@Deprecated(
"Order of extensions is now determined by its priority property since 2.11. SingletonExtensionSelector is not needed anymore. ",
level = DeprecationLevel.WARNING
level = DeprecationLevel.ERROR
)
@DeprecatedSinceMirai(warningSince = "2.11")
@DeprecatedSinceMirai(warningSince = "2.11", errorSince = "2.13")
public fun contributeSingletonExtensionSelector(lazyInstance: () -> SingletonExtensionSelector): Unit =
contribute(SingletonExtensionSelector, plugin, lazyInstance)
@Suppress("SpellCheckingInspection") // alterer
/** 注册一个 [BotConfigurationAlterer] */
public fun contributeBotConfigurationAlterer(instance: BotConfigurationAlterer): Unit =
contribute(BotConfigurationAlterer, plugin, lazyInstance = { instance })
@ -84,9 +83,12 @@ public class PluginComponentStorage(
///////////////////////////////////////////////////////////////////////////
/** 注册一个 [PermissionServiceProvider] */
@Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith")
@Deprecated("Deprecated for removal. Please implement your own CommandCallResolverProvider, and use contributePermissionService(provider).")
@DeprecatedSinceMirai(warningSince = "2.11") // for removal.
@Suppress("DEPRECATION_ERROR", "DeprecatedCallableAddReplaceWith")
@Deprecated(
"Deprecated for removal. Please implement your own CommandCallResolverProvider, and use contributePermissionService(provider).",
level = DeprecationLevel.ERROR
)
@DeprecatedSinceMirai(warningSince = "2.11", errorSince = "2.13") // for removal.
@OverloadResolutionByLambdaReturnType
public fun contributePermissionService(lazyInstance: () -> PermissionService<*>): Unit =
contribute(PermissionServiceProvider, plugin, PermissionServiceProviderImplLazy(lazyInstance))
@ -100,9 +102,12 @@ public class PluginComponentStorage(
/////////////////////////////////////
/** 注册一个 [PluginLoaderProvider] */
@Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith")
@Deprecated("Deprecated for removal. Please implement your own CommandCallResolverProvider, and use contributePluginLoader(provider).")
@DeprecatedSinceMirai(warningSince = "2.11") // for removal.
@Suppress("DEPRECATION_ERROR", "DeprecatedCallableAddReplaceWith")
@Deprecated(
"Deprecated for removal. Please implement your own CommandCallResolverProvider, and use contributePluginLoader(provider).",
level = DeprecationLevel.ERROR
)
@DeprecatedSinceMirai(warningSince = "2.11", errorSince = "2.13") // for removal.
@OverloadResolutionByLambdaReturnType
public fun contributePluginLoader(lazyInstance: () -> PluginLoader<*, *>): Unit =
contribute(PluginLoaderProvider, plugin, PluginLoaderProviderImplLazy(lazyInstance))
@ -116,9 +121,12 @@ public class PluginComponentStorage(
/////////////////////////////////////
/** 注册一个 [CommandCallParserProvider] */
@Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith")
@Deprecated("Deprecated for removal. Please implement your own CommandCallResolverProvider, and use contributeCommandCallParser(provider).")
@DeprecatedSinceMirai(warningSince = "2.11") // for removal.
@Suppress("DEPRECATION_ERROR", "DeprecatedCallableAddReplaceWith")
@Deprecated(
"Deprecated for removal. Please implement your own CommandCallResolverProvider, and use contributeCommandCallParser(provider).",
level = DeprecationLevel.ERROR
)
@DeprecatedSinceMirai(warningSince = "2.11", errorSince = "2.13") // for removal.
@ExperimentalCommandDescriptors
@OverloadResolutionByLambdaReturnType
public fun contributeCommandCallParser(lazyInstance: () -> CommandCallParser): Unit =
@ -134,9 +142,12 @@ public class PluginComponentStorage(
/////////////////////////////////////
@Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith")
@Deprecated("Deprecated for removal. Please implement your own CommandCallResolverProvider, and use contributeCommandCallResolver(provider).")
@DeprecatedSinceMirai(warningSince = "2.11") // for removal.
@Suppress("DEPRECATION_ERROR", "DeprecatedCallableAddReplaceWith")
@Deprecated(
"Deprecated for removal. Please implement your own CommandCallResolverProvider, and use contributeCommandCallResolver(provider).",
level = DeprecationLevel.ERROR
)
@DeprecatedSinceMirai(warningSince = "2.11", errorSince = "2.13") // for removal.
@ExperimentalCommandDescriptors
@OverloadResolutionByLambdaReturnType
public fun contributeCommandCallResolver(lazyInstance: () -> CommandCallResolver): Unit =
@ -152,9 +163,12 @@ public class PluginComponentStorage(
/////////////////////////////////////
/** 注册一个 [CommandCallInterceptorProvider] */
@Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith")
@Deprecated("Deprecated for removal. Please implement your own CommandCallResolverProvider, and use contributeCommandCallInterceptor(provider).")
@DeprecatedSinceMirai(warningSince = "2.11") // for removal.
@Suppress("DEPRECATION_ERROR", "DeprecatedCallableAddReplaceWith")
@Deprecated(
"Deprecated for removal. Please implement your own CommandCallResolverProvider, and use contributeCommandCallInterceptor(provider).",
level = DeprecationLevel.ERROR
)
@DeprecatedSinceMirai(warningSince = "2.11", errorSince = "2.13") // for removal.
@ExperimentalCommandDescriptors
@OverloadResolutionByLambdaReturnType
public fun contributeCommandCallInterceptor(lazyInstance: () -> CommandCallInterceptor): Unit =

View File

@ -24,14 +24,20 @@ public interface CommandCallInterceptorProvider : InstanceExtension<CommandCallI
)
}
@Deprecated("Deprecated for removal. Please implement your own CommandCallInterceptorProvider.")
@DeprecatedSinceMirai(warningSince = "2.11") // for removal.
@Deprecated(
"Deprecated for removal. Please implement your own CommandCallInterceptorProvider.",
level = DeprecationLevel.ERROR
)
@DeprecatedSinceMirai(warningSince = "2.11", errorSince = "2.13") // for removal.
@ExperimentalCommandDescriptors
public class CommandCallInterceptorProviderImpl(override val instance: CommandCallInterceptor) :
CommandCallInterceptorProvider
@Deprecated("Deprecated for removal. Please implement your own CommandCallInterceptorProvider.")
@DeprecatedSinceMirai(warningSince = "2.11") // for removal.
@Deprecated(
"Deprecated for removal. Please implement your own CommandCallInterceptorProvider.",
level = DeprecationLevel.ERROR
)
@DeprecatedSinceMirai(warningSince = "2.11", errorSince = "2.13") // for removal.
@ExperimentalCommandDescriptors
public class CommandCallInterceptorProviderImplLazy(initializer: () -> CommandCallInterceptor) :
CommandCallInterceptorProvider {

View File

@ -25,13 +25,19 @@ public interface CommandCallParserProvider : InstanceExtension<CommandCallParser
AbstractInstanceExtensionPoint<CommandCallParserProvider, CommandCallParser>(CommandCallParserProvider::class)
}
@Deprecated("Deprecated for removal. Please implement your own CommandCallParserProvider.")
@DeprecatedSinceMirai(warningSince = "2.11") // for removal.
@Deprecated(
"Deprecated for removal. Please implement your own CommandCallParserProvider.",
level = DeprecationLevel.ERROR
)
@DeprecatedSinceMirai(warningSince = "2.11", errorSince = "2.13") // for removal.
@ExperimentalCommandDescriptors
public class CommandCallParserProviderImpl(override val instance: CommandCallParser) : CommandCallParserProvider
@Deprecated("Deprecated for removal. Please implement your own CommandCallParserProvider.")
@DeprecatedSinceMirai(warningSince = "2.11") // for removal.
@Deprecated(
"Deprecated for removal. Please implement your own CommandCallParserProvider.",
level = DeprecationLevel.ERROR
)
@DeprecatedSinceMirai(warningSince = "2.11", errorSince = "2.13") // for removal.
@ExperimentalCommandDescriptors
public class CommandCallParserProviderImplLazy(initializer: () -> CommandCallParser) : CommandCallParserProvider {
override val instance: CommandCallParser by lazy(initializer)

View File

@ -23,13 +23,19 @@ public interface CommandCallResolverProvider : InstanceExtension<CommandCallReso
AbstractInstanceExtensionPoint<CommandCallResolverProvider, CommandCallResolver>(CommandCallResolverProvider::class)
}
@Deprecated("Deprecated for removal. Please implement your own CommandCallResolverProvider.")
@DeprecatedSinceMirai(warningSince = "2.11") // for removal.
@Deprecated(
"Deprecated for removal. Please implement your own CommandCallResolverProvider.",
level = DeprecationLevel.ERROR
)
@DeprecatedSinceMirai(warningSince = "2.11", errorSince = "2.13") // for removal.
@ExperimentalCommandDescriptors
public class CommandCallResolverProviderImpl(override val instance: CommandCallResolver) : CommandCallResolverProvider
@Deprecated("Deprecated for removal. Please implement your own CommandCallResolverProvider.")
@DeprecatedSinceMirai(warningSince = "2.11") // for removal.
@Deprecated(
"Deprecated for removal. Please implement your own CommandCallResolverProvider.",
level = DeprecationLevel.ERROR
)
@DeprecatedSinceMirai(warningSince = "2.11", errorSince = "2.13") // for removal.
@ExperimentalCommandDescriptors
public class CommandCallResolverProviderImplLazy(initializer: () -> CommandCallResolver) : CommandCallResolverProvider {
override val instance: CommandCallResolver by lazy(initializer)

View File

@ -29,15 +29,15 @@ public interface PermissionServiceProvider : InstanceExtension<PermissionService
/**
* @see PermissionServiceProvider
*/
@Deprecated("Please implement your own PermissionServiceProvider.")
@DeprecatedSinceMirai(warningSince = "2.11") // for hidden.
@Deprecated("Please implement your own PermissionServiceProvider.", level = DeprecationLevel.ERROR)
@DeprecatedSinceMirai(warningSince = "2.11", errorSince = "2.13") // for hidden.
public class PermissionServiceProviderImpl(override val instance: PermissionService<*>) : PermissionServiceProvider
/**
* @see PermissionServiceProvider
*/
@Deprecated("Please implement your own PermissionServiceProvider.")
@DeprecatedSinceMirai(warningSince = "2.11") // for hidden.
@Deprecated("Please implement your own PermissionServiceProvider.", level = DeprecationLevel.ERROR)
@DeprecatedSinceMirai(warningSince = "2.11", errorSince = "2.13") // for hidden.
public class PermissionServiceProviderImplLazy(initializer: () -> PermissionService<*>) : PermissionServiceProvider {
override val instance: PermissionService<*> by lazy(initializer)
}

View File

@ -31,12 +31,12 @@ public interface PluginLoaderProvider : InstanceExtension<PluginLoader<*, *>> {
public companion object ExtensionPoint : AbstractExtensionPoint<PluginLoaderProvider>(PluginLoaderProvider::class)
}
@Deprecated("Please implement your own PluginLoaderProvider.")
@DeprecatedSinceMirai(warningSince = "2.11") // for hidden.
@Deprecated("Please implement your own PluginLoaderProvider.", level = DeprecationLevel.ERROR)
@DeprecatedSinceMirai(warningSince = "2.11", errorSince = "2.13") // for hidden.
public class PluginLoaderProviderImpl(override val instance: PluginLoader<*, *>) : PluginLoaderProvider
@Deprecated("Please implement your own PluginLoaderProvider.")
@DeprecatedSinceMirai(warningSince = "2.11") // for hidden.
@Deprecated("Please implement your own PluginLoaderProvider.", level = DeprecationLevel.ERROR)
@DeprecatedSinceMirai(warningSince = "2.11", errorSince = "2.13") // for hidden.
public class PluginLoaderProviderImplLazy(initializer: () -> PluginLoader<*, *>) : PluginLoaderProvider {
override val instance: PluginLoader<*, *> by lazy(initializer)
}

View File

@ -7,7 +7,7 @@
* https://github.com/mamoe/mirai/blob/dev/LICENSE
*/
@file:Suppress("DEPRECATION")
@file:Suppress("DEPRECATION_ERROR")
package net.mamoe.mirai.console.extensions
@ -28,18 +28,19 @@ import kotlin.reflect.KClass
*/
@Deprecated(
"Order of extensions is now determined by its priority property since 2.11. SingletonExtensionSelector is not needed anymore. ",
level = DeprecationLevel.WARNING
level = DeprecationLevel.ERROR
)
@DeprecatedSinceMirai(warningSince = "2.11")
@DeprecatedSinceMirai(warningSince = "2.11", errorSince = "2.13")
@Suppress("DEPRECATION_ERROR")
public interface SingletonExtensionSelector : FunctionExtension {
/**
* 表示一个插件注册的 [Extension]
*/
@Deprecated(
"Order of extensions is now determined by its priority property since 2.11. SingletonExtensionSelector is not needed anymore. ",
level = DeprecationLevel.WARNING
level = DeprecationLevel.ERROR
)
@DeprecatedSinceMirai(warningSince = "2.11")
@DeprecatedSinceMirai(warningSince = "2.11", errorSince = "2.13")
public data class Registry<T : Extension>(
val plugin: Plugin?,
val extension: T,
@ -55,9 +56,9 @@ public interface SingletonExtensionSelector : FunctionExtension {
@Deprecated(
"Order of extensions is now determined by its priority property since 2.11. SingletonExtensionSelector is not needed anymore. ",
level = DeprecationLevel.WARNING
level = DeprecationLevel.ERROR
)
@DeprecatedSinceMirai(warningSince = "2.11")
@DeprecatedSinceMirai(warningSince = "2.11", errorSince = "2.13")
public companion object ExtensionPoint :
AbstractExtensionPoint<SingletonExtensionSelector>(SingletonExtensionSelector::class) {

View File

@ -7,7 +7,7 @@
* https://github.com/mamoe/mirai/blob/dev/LICENSE
*/
@file:Suppress("DEPRECATION")
@file:Suppress("DEPRECATION_ERROR")
package net.mamoe.mirai.console.internal.extension
@ -24,12 +24,11 @@ import net.mamoe.mirai.utils.DeprecatedSinceMirai
import net.mamoe.mirai.utils.info
import kotlin.reflect.KClass
@Suppress("DEPRECATION")
@Deprecated(
"Order of extensions is not determined by its priority property since 2.11. SingletonExtensionSelector is not needed anymore. ",
level = DeprecationLevel.WARNING
level = DeprecationLevel.ERROR
)
@DeprecatedSinceMirai(warningSince = "2.11")
@DeprecatedSinceMirai(warningSince = "2.11", errorSince = "2.13")
internal object SingletonExtensionSelectorImpl : SingletonExtensionSelector {
internal val config: SaveData = SaveData()

View File

@ -13,47 +13,10 @@ import kotlinx.atomicfu.atomic
import kotlinx.atomicfu.loop
import kotlinx.coroutines.*
import net.mamoe.mirai.console.internal.util.runIgnoreException
import net.mamoe.mirai.utils.DeprecatedSinceMirai
import net.mamoe.mirai.utils.currentTimeMillis
import kotlin.coroutines.CoroutineContext
import kotlin.coroutines.EmptyCoroutineContext
@Suppress("DEPRECATION", "DEPRECATION_ERROR", "DeprecatedCallableAddReplaceWith")
@Deprecated("No longer supported, deprecated for removal.", level = DeprecationLevel.ERROR)
@DeprecatedSinceMirai(warningSince = "2.10.0-RC", errorSince = "2.12")
@ConsoleExperimentalApi
public object CoroutineScopeUtils {
@Deprecated("No longer supported, deprecated for removal.", level = DeprecationLevel.ERROR)
@DeprecatedSinceMirai(warningSince = "2.10.0-RC", errorSince = "2.12")
@JvmStatic
@ConsoleExperimentalApi
public fun CoroutineContext.overrideWithSupervisorJob(name: String? = null): CoroutineContext =
this + NamedSupervisorJob(name ?: "<unnamed>", this[Job])
@Deprecated("No longer supported, deprecated for removal.", level = DeprecationLevel.ERROR)
@DeprecatedSinceMirai(warningSince = "2.10.0-RC", errorSince = "2.12")
@JvmStatic
@ConsoleExperimentalApi
public fun CoroutineScope.childScope(
name: String? = null,
context: CoroutineContext = EmptyCoroutineContext
): CoroutineScope =
CoroutineScope(this.childScopeContext(name, context))
@Deprecated("No longer supported, deprecated for removal.", level = DeprecationLevel.ERROR)
@DeprecatedSinceMirai(warningSince = "2.10.0-RC", errorSince = "2.12")
@JvmStatic
@ConsoleExperimentalApi
public fun CoroutineScope.childScopeContext(
name: String? = null,
context: CoroutineContext = EmptyCoroutineContext
): CoroutineContext =
this.coroutineContext.overrideWithSupervisorJob(name) + context.let {
if (name != null) it + CoroutineName(name)
else it
}
}
/**
* Runs `action` every `intervalMillis` since each time [setChanged] is called, ignoring subsequent calls during the interval.
*/
@ -99,15 +62,3 @@ internal fun CoroutineScope.launchTimedTask(
coroutineContext: CoroutineContext = EmptyCoroutineContext,
action: suspend CoroutineScope.() -> Unit,
) = TimedTask(this, coroutineContext, intervalMillis, action)
@Deprecated("No longer supported, deprecated for removal.", level = DeprecationLevel.ERROR)
@DeprecatedSinceMirai(warningSince = "2.10.0-RC", errorSince = "2.12")
@ConsoleExperimentalApi
public class NamedSupervisorJob @JvmOverloads constructor(
private val name: String,
parent: Job? = null
) : CompletableJob by SupervisorJob(parent) {
override fun toString(): String {
return "NamedSupervisorJob($name)"
}
}

View File

@ -1817,8 +1817,6 @@ public abstract interface annotation class net/mamoe/mirai/event/EventHandler :
public final class net/mamoe/mirai/event/EventKt {
public static final fun broadcast (Lnet/mamoe/mirai/event/Event;)Lnet/mamoe/mirai/event/Event;
public static final fun broadcast (Lnet/mamoe/mirai/event/Event;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static final fun getEventDisabled ()Z
public static final fun setEventDisabled (Z)V
}
public final class net/mamoe/mirai/event/EventPriority : java/lang/Enum {
@ -6312,14 +6310,14 @@ public abstract interface class net/mamoe/mirai/utils/RemoteFile {
public static synthetic fun resolveById$suspendImpl (Lnet/mamoe/mirai/utils/RemoteFile;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public abstract fun resolveSibling (Ljava/lang/String;)Lnet/mamoe/mirai/utils/RemoteFile;
public abstract fun resolveSibling (Lnet/mamoe/mirai/utils/RemoteFile;)Lnet/mamoe/mirai/utils/RemoteFile;
public static fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Ljava/io/File;)Lnet/mamoe/mirai/message/MessageReceipt;
public static fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Ljava/io/File;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Ljava/io/File;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;)Lnet/mamoe/mirai/message/MessageReceipt;
public static fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Ljava/io/File;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/ExternalResource;)Lnet/mamoe/mirai/message/MessageReceipt;
public static fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/ExternalResource;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;)Lnet/mamoe/mirai/message/MessageReceipt;
public static fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Ljava/io/File;)Lnet/mamoe/mirai/message/MessageReceipt;
public static synthetic fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Ljava/io/File;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Ljava/io/File;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;)Lnet/mamoe/mirai/message/MessageReceipt;
public static synthetic fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Ljava/io/File;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/ExternalResource;)Lnet/mamoe/mirai/message/MessageReceipt;
public static synthetic fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/ExternalResource;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;)Lnet/mamoe/mirai/message/MessageReceipt;
public static synthetic fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public fun toMessage ()Lnet/mamoe/mirai/message/data/FileMessage;
public abstract fun toMessage (Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public abstract fun toString ()Ljava/lang/String;
@ -6350,14 +6348,14 @@ public abstract interface class net/mamoe/mirai/utils/RemoteFile {
public final class net/mamoe/mirai/utils/RemoteFile$Companion {
public static final field ROOT_PATH Ljava/lang/String;
public final fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Ljava/io/File;)Lnet/mamoe/mirai/message/MessageReceipt;
public final fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Ljava/io/File;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public final fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Ljava/io/File;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;)Lnet/mamoe/mirai/message/MessageReceipt;
public final fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Ljava/io/File;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public final fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/ExternalResource;)Lnet/mamoe/mirai/message/MessageReceipt;
public final fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/ExternalResource;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public final fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;)Lnet/mamoe/mirai/message/MessageReceipt;
public final fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public final synthetic fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Ljava/io/File;)Lnet/mamoe/mirai/message/MessageReceipt;
public final synthetic fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Ljava/io/File;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public final synthetic fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Ljava/io/File;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;)Lnet/mamoe/mirai/message/MessageReceipt;
public final synthetic fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Ljava/io/File;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public final synthetic fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/ExternalResource;)Lnet/mamoe/mirai/message/MessageReceipt;
public final synthetic fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/ExternalResource;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public final synthetic fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;)Lnet/mamoe/mirai/message/MessageReceipt;
public final synthetic fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun sendFile$default (Lnet/mamoe/mirai/utils/RemoteFile$Companion;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Ljava/io/File;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;ILjava/lang/Object;)Lnet/mamoe/mirai/message/MessageReceipt;
public static synthetic fun sendFile$default (Lnet/mamoe/mirai/utils/RemoteFile$Companion;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Ljava/io/File;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static synthetic fun sendFile$default (Lnet/mamoe/mirai/utils/RemoteFile$Companion;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;ILjava/lang/Object;)Lnet/mamoe/mirai/message/MessageReceipt;

View File

@ -1817,8 +1817,6 @@ public abstract interface annotation class net/mamoe/mirai/event/EventHandler :
public final class net/mamoe/mirai/event/EventKt {
public static final fun broadcast (Lnet/mamoe/mirai/event/Event;)Lnet/mamoe/mirai/event/Event;
public static final fun broadcast (Lnet/mamoe/mirai/event/Event;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static final fun getEventDisabled ()Z
public static final fun setEventDisabled (Z)V
}
public final class net/mamoe/mirai/event/EventPriority : java/lang/Enum {
@ -6312,14 +6310,14 @@ public abstract interface class net/mamoe/mirai/utils/RemoteFile {
public static synthetic fun resolveById$suspendImpl (Lnet/mamoe/mirai/utils/RemoteFile;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public abstract fun resolveSibling (Ljava/lang/String;)Lnet/mamoe/mirai/utils/RemoteFile;
public abstract fun resolveSibling (Lnet/mamoe/mirai/utils/RemoteFile;)Lnet/mamoe/mirai/utils/RemoteFile;
public static fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Ljava/io/File;)Lnet/mamoe/mirai/message/MessageReceipt;
public static fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Ljava/io/File;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Ljava/io/File;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;)Lnet/mamoe/mirai/message/MessageReceipt;
public static fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Ljava/io/File;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/ExternalResource;)Lnet/mamoe/mirai/message/MessageReceipt;
public static fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/ExternalResource;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;)Lnet/mamoe/mirai/message/MessageReceipt;
public static fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Ljava/io/File;)Lnet/mamoe/mirai/message/MessageReceipt;
public static synthetic fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Ljava/io/File;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Ljava/io/File;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;)Lnet/mamoe/mirai/message/MessageReceipt;
public static synthetic fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Ljava/io/File;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/ExternalResource;)Lnet/mamoe/mirai/message/MessageReceipt;
public static synthetic fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/ExternalResource;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;)Lnet/mamoe/mirai/message/MessageReceipt;
public static synthetic fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public fun toMessage ()Lnet/mamoe/mirai/message/data/FileMessage;
public abstract fun toMessage (Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public abstract fun toString ()Ljava/lang/String;
@ -6350,14 +6348,14 @@ public abstract interface class net/mamoe/mirai/utils/RemoteFile {
public final class net/mamoe/mirai/utils/RemoteFile$Companion {
public static final field ROOT_PATH Ljava/lang/String;
public final fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Ljava/io/File;)Lnet/mamoe/mirai/message/MessageReceipt;
public final fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Ljava/io/File;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public final fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Ljava/io/File;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;)Lnet/mamoe/mirai/message/MessageReceipt;
public final fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Ljava/io/File;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public final fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/ExternalResource;)Lnet/mamoe/mirai/message/MessageReceipt;
public final fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/ExternalResource;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public final fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;)Lnet/mamoe/mirai/message/MessageReceipt;
public final fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public final synthetic fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Ljava/io/File;)Lnet/mamoe/mirai/message/MessageReceipt;
public final synthetic fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Ljava/io/File;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public final synthetic fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Ljava/io/File;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;)Lnet/mamoe/mirai/message/MessageReceipt;
public final synthetic fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Ljava/io/File;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public final synthetic fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/ExternalResource;)Lnet/mamoe/mirai/message/MessageReceipt;
public final synthetic fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/ExternalResource;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public final synthetic fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;)Lnet/mamoe/mirai/message/MessageReceipt;
public final synthetic fun sendFile (Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun sendFile$default (Lnet/mamoe/mirai/utils/RemoteFile$Companion;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Ljava/io/File;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;ILjava/lang/Object;)Lnet/mamoe/mirai/message/MessageReceipt;
public static synthetic fun sendFile$default (Lnet/mamoe/mirai/utils/RemoteFile$Companion;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Ljava/io/File;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static synthetic fun sendFile$default (Lnet/mamoe/mirai/utils/RemoteFile$Companion;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;ILjava/lang/Object;)Lnet/mamoe/mirai/message/MessageReceipt;

View File

@ -15,8 +15,6 @@ import kotlinx.coroutines.sync.Mutex
import me.him188.kotlin.jvm.blocking.bridge.JvmBlockingBridge
import net.mamoe.mirai.IMirai
import net.mamoe.mirai.Mirai
import net.mamoe.mirai.utils.DeprecatedSinceMirai
import net.mamoe.mirai.utils.MiraiExperimentalApi
import net.mamoe.mirai.utils.MiraiInternalApi
import kotlin.jvm.JvmField
import kotlin.jvm.Volatile
@ -160,18 +158,6 @@ public suspend fun <E : Event> E.broadcast(): E {
return this
}
/**
* 设置为 `true` 以关闭事件.
* 所有的 `subscribe` 都能正常添加到监听器列表, 但所有的广播都会直接返回.
*/
@MiraiExperimentalApi
@Deprecated(
"Deprecated without replacement. If you really need this, please file an issue.",
level = DeprecationLevel.ERROR
)
@DeprecatedSinceMirai(errorSince = "2.12")
public var EventDisabled: Boolean = false
/**
* 可控制是否需要广播这个事件
*/

View File

@ -37,7 +37,7 @@ import kotlin.reflect.KClass
* @throws TimeoutCancellationException 在超时后抛出.
*/
@JvmSynthetic
@DeprecatedSinceMirai(warningSince = "2.10", errorSince = "2.12")
@DeprecatedSinceMirai(warningSince = "2.10", errorSince = "2.12", hiddenSince = "2.13")
@Deprecated(
"Use GlobalEventChannel.nextEvent",
ReplaceWith(
@ -45,7 +45,7 @@ import kotlin.reflect.KClass
"net.mamoe.mirai.event.GlobalEventChannel",
"kotlinx.coroutines.withTimeout",
),
level = DeprecationLevel.ERROR
level = DeprecationLevel.HIDDEN
)
public suspend inline fun <reified E : Event> nextEvent(
timeoutMillis: Long = -1,
@ -74,7 +74,7 @@ public suspend inline fun <reified E : Event> nextEvent(
* @return 事件实例, 在超时后返回 `null`
*/
@JvmSynthetic
@DeprecatedSinceMirai(warningSince = "2.10", errorSince = "2.12")
@DeprecatedSinceMirai(warningSince = "2.10", errorSince = "2.12", hiddenSince = "2.13")
@Deprecated(
"Use GlobalEventChannel.nextEvent",
ReplaceWith(
@ -84,7 +84,7 @@ public suspend inline fun <reified E : Event> nextEvent(
"net.mamoe.mirai.event.GlobalEventChannel",
"net.mamoe.mirai.event.nextEvent"
),
level = DeprecationLevel.ERROR
level = DeprecationLevel.HIDDEN
)
public suspend inline fun <reified E : Event> nextEventOrNull(
timeoutMillis: Long,

View File

@ -52,9 +52,9 @@ import kotlin.coroutines.EmptyCoroutineContext
"net.mamoe.mirai.event.GlobalEventChannel",
"net.mamoe.mirai.event.nextEvent"
),
level = DeprecationLevel.ERROR
level = DeprecationLevel.HIDDEN
)
@DeprecatedSinceMirai(warningSince = "2.10", errorSince = "2.12")
@DeprecatedSinceMirai(warningSince = "2.10", errorSince = "2.12", hiddenSince = "2.13")
@MiraiExperimentalApi
public inline fun <reified E : Event> CoroutineScope.nextEventAsync(
timeoutMillis: Long = -1,
@ -106,9 +106,9 @@ public inline fun <reified E : Event> CoroutineScope.nextEventAsync(
"net.mamoe.mirai.event.GlobalEventChannel",
"net.mamoe.mirai.event.nextEvent"
),
level = DeprecationLevel.ERROR
level = DeprecationLevel.HIDDEN
)
@DeprecatedSinceMirai(warningSince = "2.10", errorSince = "2.12")
@DeprecatedSinceMirai(warningSince = "2.10", errorSince = "2.12", hiddenSince = "2.13")
@JvmSynthetic
public inline fun <reified E : Event> CoroutineScope.nextEventOrNullAsync(
timeoutMillis: Long,

View File

@ -33,7 +33,7 @@ import kotlin.reflect.KClass
* @throws TimeoutCancellationException 在超时后抛出.
* @throws Throwable [mapper] 抛出任何异常时, 本函数会抛出该异常
*/
@DeprecatedSinceMirai(warningSince = "2.10", errorSince = "2.12")
@DeprecatedSinceMirai(warningSince = "2.10", errorSince = "2.12", hiddenSince = "2.13")
@Deprecated(
"Use GlobalEventChannel.syncFromEvent",
ReplaceWith(
@ -42,7 +42,7 @@ import kotlin.reflect.KClass
"net.mamoe.mirai.event.GlobalEventChannel",
"net.mamoe.mirai.event.syncFromEvent"
),
level = DeprecationLevel.ERROR
level = DeprecationLevel.HIDDEN
)
@JvmSynthetic
public suspend inline fun <reified E : Event, R : Any> syncFromEvent(
@ -79,11 +79,11 @@ public suspend inline fun <reified E : Event, R : Any> syncFromEvent(
* @throws Throwable [mapper] 抛出任何异常时, 本函数会抛出该异常
*/
@JvmSynthetic
@DeprecatedSinceMirai(warningSince = "2.10", errorSince = "2.12")
@DeprecatedSinceMirai(warningSince = "2.10", errorSince = "2.12", hiddenSince = "2.13")
@Deprecated(
"Use GlobalEventChannel.syncFromEvent",
ReplaceWith("withTimeoutOrNull(timeoutMillis) { GlobalEventChannel.syncFromEvent<E, R>(priority) { event -> with(event) { mapper(event) } }"),
level = DeprecationLevel.ERROR
level = DeprecationLevel.HIDDEN
)
public suspend inline fun <reified E : Event, R : Any> syncFromEventOrNull(
timeoutMillis: Long,
@ -125,10 +125,10 @@ public suspend inline fun <reified E : Event, R : Any> syncFromEventOrNull(
"net.mamoe.mirai.event.globalEventChannel",
"net.mamoe.mirai.event.syncFromEvent"
),
level = DeprecationLevel.ERROR
level = DeprecationLevel.HIDDEN
)
@JvmSynthetic
@DeprecatedSinceMirai(warningSince = "2.10", errorSince = "2.12")
@DeprecatedSinceMirai(warningSince = "2.10", errorSince = "2.12", hiddenSince = "2.13")
@Suppress("DeferredIsResult")
public inline fun <reified E : Event, R : Any> CoroutineScope.asyncFromEventOrNull(
timeoutMillis: Long,
@ -177,9 +177,9 @@ public inline fun <reified E : Event, R : Any> CoroutineScope.asyncFromEventOrNu
"net.mamoe.mirai.event.globalEventChannel",
"net.mamoe.mirai.event.syncFromEvent"
),
level = DeprecationLevel.ERROR
level = DeprecationLevel.HIDDEN
)
@DeprecatedSinceMirai(warningSince = "2.10", errorSince = "2.12")
@DeprecatedSinceMirai(warningSince = "2.10", errorSince = "2.12", hiddenSince = "2.13")
@JvmSynthetic
@Suppress("DeferredIsResult")
public inline fun <reified E : Event, R : Any> CoroutineScope.asyncFromEvent(

View File

@ -636,9 +636,9 @@ public interface RemoteFile {
@Deprecated(
"Deprecated. Please use AbsoluteFolder.uploadNewFile or RemoteFiles.uploadNewFile",
ReplaceWith("this.files.uploadNewFile(path, resource, callback)"),
level = DeprecationLevel.ERROR
level = DeprecationLevel.HIDDEN
) // deprecated since 2.8.0-RC
@DeprecatedSinceMirai(warningSince = "2.8", errorSince = "2.12")
@DeprecatedSinceMirai(warningSince = "2.8", errorSince = "2.12", hiddenSince = "2.13")
@Suppress("_FUNCTION_WITH_DEFAULT_ARGUMENTS")
public suspend fun <C : FileSupported> C.sendFile(
path: String,
@ -657,9 +657,9 @@ public interface RemoteFile {
@Deprecated(
"Deprecated. Please use AbsoluteFolder.uploadNewFile or RemoteFiles.uploadNewFile",
ReplaceWith("file.toExternalResource().use { this.files.uploadNewFile(path, it, callback) }"),
level = DeprecationLevel.ERROR
level = DeprecationLevel.HIDDEN
) // deprecated since 2.8.0-RC
@DeprecatedSinceMirai(warningSince = "2.8", errorSince = "2.12")
@DeprecatedSinceMirai(warningSince = "2.8", errorSince = "2.12", hiddenSince = "2.13")
public suspend fun <C : FileSupported> C.sendFile(
path: String,
file: File,