Review deprecation for 2.11, close #1837

This commit is contained in:
Him188 2022-04-13 12:39:30 +01:00
parent 499f7beb1d
commit 8993de9a13
15 changed files with 153 additions and 178 deletions

View File

@ -27,6 +27,7 @@ import java.util.concurrent.TimeUnit
import java.util.concurrent.atomic.AtomicInteger
import java.util.concurrent.atomic.AtomicReference
// Used by https://github.com/iTXTech/soyuz, change with care.
internal sealed class LoggingService {
@TestOnly
internal lateinit var switchLogFileNow: () -> Unit

View File

@ -373,8 +373,8 @@ public abstract interface class net/mamoe/mirai/contact/Group : kotlinx/coroutin
public fun setEssenceMessage (Lnet/mamoe/mirai/message/data/MessageSource;)Z
public abstract fun setEssenceMessage (Lnet/mamoe/mirai/message/data/MessageSource;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public abstract fun setName (Ljava/lang/String;)V
public fun uploadVoice (Lnet/mamoe/mirai/utils/ExternalResource;)Lnet/mamoe/mirai/message/data/Voice;
public abstract fun uploadVoice (Lnet/mamoe/mirai/utils/ExternalResource;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public synthetic fun uploadVoice (Lnet/mamoe/mirai/utils/ExternalResource;)Lnet/mamoe/mirai/message/data/Voice;
public abstract synthetic fun uploadVoice (Lnet/mamoe/mirai/utils/ExternalResource;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
}
public final class net/mamoe/mirai/contact/Group$Companion {
@ -389,14 +389,14 @@ public final class net/mamoe/mirai/contact/GroupKt {
}
public abstract interface class net/mamoe/mirai/contact/GroupSettings {
public abstract fun getEntranceAnnouncement ()Ljava/lang/String;
public abstract synthetic fun getEntranceAnnouncement ()Ljava/lang/String;
public abstract fun isAllowMemberInvite ()Z
public abstract fun isAnonymousChatEnabled ()Z
public abstract fun isAutoApproveEnabled ()Z
public abstract fun isMuteAll ()Z
public abstract fun setAllowMemberInvite (Z)V
public abstract fun setAnonymousChatEnabled (Z)V
public abstract fun setEntranceAnnouncement (Ljava/lang/String;)V
public abstract synthetic fun setEntranceAnnouncement (Ljava/lang/String;)V
public abstract fun setMuteAll (Z)V
}
@ -5911,10 +5911,10 @@ public abstract interface class net/mamoe/mirai/utils/ExternalResource : java/io
public static fun sendTo (Ljava/io/File;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;)Lnet/mamoe/mirai/message/MessageReceipt;
public static fun sendTo (Ljava/io/File;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public fun toAutoCloseable ()Lnet/mamoe/mirai/utils/ExternalResource;
public static fun uploadAsFile (Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;)Lnet/mamoe/mirai/message/data/FileMessage;
public static fun uploadAsFile (Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static fun uploadAsFile (Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;)Lnet/mamoe/mirai/message/data/FileMessage;
public static fun uploadAsFile (Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun uploadAsFile (Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;)Lnet/mamoe/mirai/message/data/FileMessage;
public static synthetic fun uploadAsFile (Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun uploadAsFile (Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;)Lnet/mamoe/mirai/message/data/FileMessage;
public static synthetic fun uploadAsFile (Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static fun uploadAsImage (Ljava/io/File;Lnet/mamoe/mirai/contact/Contact;)Lnet/mamoe/mirai/message/data/Image;
public static fun uploadAsImage (Ljava/io/File;Lnet/mamoe/mirai/contact/Contact;Ljava/lang/String;)Lnet/mamoe/mirai/message/data/Image;
public static fun uploadAsImage (Ljava/io/File;Lnet/mamoe/mirai/contact/Contact;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
@ -5925,12 +5925,12 @@ public abstract interface class net/mamoe/mirai/utils/ExternalResource : java/io
public static fun uploadAsImage (Ljava/io/InputStream;Lnet/mamoe/mirai/contact/Contact;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static fun uploadAsImage (Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/contact/Contact;)Lnet/mamoe/mirai/message/data/Image;
public static fun uploadAsImage (Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/contact/Contact;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static fun uploadAsVoice (Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/contact/Contact;)Lnet/mamoe/mirai/message/data/Voice;
public static fun uploadAsVoice (Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/contact/Contact;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static fun uploadTo (Ljava/io/File;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;)Lnet/mamoe/mirai/message/data/FileMessage;
public static fun uploadTo (Ljava/io/File;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static fun uploadTo (Ljava/io/File;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;)Lnet/mamoe/mirai/message/data/FileMessage;
public static fun uploadTo (Ljava/io/File;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun uploadAsVoice (Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/contact/Contact;)Lnet/mamoe/mirai/message/data/Voice;
public static synthetic fun uploadAsVoice (Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/contact/Contact;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun uploadTo (Ljava/io/File;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;)Lnet/mamoe/mirai/message/data/FileMessage;
public static synthetic fun uploadTo (Ljava/io/File;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun uploadTo (Ljava/io/File;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;)Lnet/mamoe/mirai/message/data/FileMessage;
public static synthetic fun uploadTo (Ljava/io/File;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
}
public final class net/mamoe/mirai/utils/ExternalResource$Companion {
@ -5975,10 +5975,10 @@ public final class net/mamoe/mirai/utils/ExternalResource$Companion {
public final fun sendTo (Ljava/io/File;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun sendTo$default (Lnet/mamoe/mirai/utils/ExternalResource$Companion;Ljava/io/File;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;ILjava/lang/Object;)Lnet/mamoe/mirai/message/MessageReceipt;
public static synthetic fun sendTo$default (Lnet/mamoe/mirai/utils/ExternalResource$Companion;Ljava/io/File;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public final fun uploadAsFile (Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;)Lnet/mamoe/mirai/message/data/FileMessage;
public final fun uploadAsFile (Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public final fun uploadAsFile (Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;)Lnet/mamoe/mirai/message/data/FileMessage;
public final fun uploadAsFile (Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public final synthetic fun uploadAsFile (Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;)Lnet/mamoe/mirai/message/data/FileMessage;
public final synthetic fun uploadAsFile (Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public final synthetic fun uploadAsFile (Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;)Lnet/mamoe/mirai/message/data/FileMessage;
public final synthetic fun uploadAsFile (Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun uploadAsFile$default (Lnet/mamoe/mirai/utils/ExternalResource$Companion;Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;ILjava/lang/Object;)Lnet/mamoe/mirai/message/data/FileMessage;
public static synthetic fun uploadAsFile$default (Lnet/mamoe/mirai/utils/ExternalResource$Companion;Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public final fun uploadAsImage (Ljava/io/File;Lnet/mamoe/mirai/contact/Contact;)Lnet/mamoe/mirai/message/data/Image;
@ -5995,12 +5995,12 @@ public final class net/mamoe/mirai/utils/ExternalResource$Companion {
public static synthetic fun uploadAsImage$default (Lnet/mamoe/mirai/utils/ExternalResource$Companion;Ljava/io/File;Lnet/mamoe/mirai/contact/Contact;Ljava/lang/String;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static synthetic fun uploadAsImage$default (Lnet/mamoe/mirai/utils/ExternalResource$Companion;Ljava/io/InputStream;Lnet/mamoe/mirai/contact/Contact;Ljava/lang/String;ILjava/lang/Object;)Lnet/mamoe/mirai/message/data/Image;
public static synthetic fun uploadAsImage$default (Lnet/mamoe/mirai/utils/ExternalResource$Companion;Ljava/io/InputStream;Lnet/mamoe/mirai/contact/Contact;Ljava/lang/String;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public final fun uploadAsVoice (Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/contact/Contact;)Lnet/mamoe/mirai/message/data/Voice;
public final fun uploadAsVoice (Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/contact/Contact;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public final fun uploadTo (Ljava/io/File;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;)Lnet/mamoe/mirai/message/data/FileMessage;
public final fun uploadTo (Ljava/io/File;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public final fun uploadTo (Ljava/io/File;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;)Lnet/mamoe/mirai/message/data/FileMessage;
public final fun uploadTo (Ljava/io/File;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public final synthetic fun uploadAsVoice (Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/contact/Contact;)Lnet/mamoe/mirai/message/data/Voice;
public final synthetic fun uploadAsVoice (Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/contact/Contact;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public final synthetic fun uploadTo (Ljava/io/File;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;)Lnet/mamoe/mirai/message/data/FileMessage;
public final synthetic fun uploadTo (Ljava/io/File;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public final synthetic fun uploadTo (Ljava/io/File;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;)Lnet/mamoe/mirai/message/data/FileMessage;
public final synthetic fun uploadTo (Ljava/io/File;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun uploadTo$default (Lnet/mamoe/mirai/utils/ExternalResource$Companion;Ljava/io/File;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;ILjava/lang/Object;)Lnet/mamoe/mirai/message/data/FileMessage;
public static synthetic fun uploadTo$default (Lnet/mamoe/mirai/utils/ExternalResource$Companion;Ljava/io/File;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
}
@ -6069,14 +6069,14 @@ public abstract interface class net/mamoe/mirai/utils/MiraiLogger {
public static final field Companion Lnet/mamoe/mirai/utils/MiraiLogger$Companion;
public fun call (Lnet/mamoe/mirai/utils/SimpleLogger$LogPriority;Ljava/lang/String;Ljava/lang/Throwable;)V
public static synthetic fun call$default (Lnet/mamoe/mirai/utils/MiraiLogger;Lnet/mamoe/mirai/utils/SimpleLogger$LogPriority;Ljava/lang/String;Ljava/lang/Throwable;ILjava/lang/Object;)V
public static fun create (Ljava/lang/String;)Lnet/mamoe/mirai/utils/MiraiLogger;
public static synthetic fun create (Ljava/lang/String;)Lnet/mamoe/mirai/utils/MiraiLogger;
public abstract fun debug (Ljava/lang/String;)V
public abstract fun debug (Ljava/lang/String;Ljava/lang/Throwable;)V
public fun debug (Ljava/lang/Throwable;)V
public abstract fun error (Ljava/lang/String;)V
public abstract fun error (Ljava/lang/String;Ljava/lang/Throwable;)V
public fun error (Ljava/lang/Throwable;)V
public fun getFollower ()Lnet/mamoe/mirai/utils/MiraiLogger;
public synthetic fun getFollower ()Lnet/mamoe/mirai/utils/MiraiLogger;
public abstract fun getIdentity ()Ljava/lang/String;
public abstract fun info (Ljava/lang/String;)V
public abstract fun info (Ljava/lang/String;Ljava/lang/Throwable;)V
@ -6087,9 +6087,9 @@ public abstract interface class net/mamoe/mirai/utils/MiraiLogger {
public fun isInfoEnabled ()Z
public fun isVerboseEnabled ()Z
public fun isWarningEnabled ()Z
public fun plus (Lnet/mamoe/mirai/utils/MiraiLogger;)Lnet/mamoe/mirai/utils/MiraiLogger;
public synthetic fun plus (Lnet/mamoe/mirai/utils/MiraiLogger;)Lnet/mamoe/mirai/utils/MiraiLogger;
public static fun setDefaultLoggerCreator (Lkotlin/jvm/functions/Function1;)V
public fun setFollower (Lnet/mamoe/mirai/utils/MiraiLogger;)V
public synthetic fun setFollower (Lnet/mamoe/mirai/utils/MiraiLogger;)V
public abstract fun verbose (Ljava/lang/String;)V
public abstract fun verbose (Ljava/lang/String;Ljava/lang/Throwable;)V
public fun verbose (Ljava/lang/Throwable;)V
@ -6099,8 +6099,8 @@ public abstract interface class net/mamoe/mirai/utils/MiraiLogger {
}
public final class net/mamoe/mirai/utils/MiraiLogger$Companion {
public final fun create (Ljava/lang/String;)Lnet/mamoe/mirai/utils/MiraiLogger;
public final fun getTopLevel ()Lnet/mamoe/mirai/utils/MiraiLogger;
public final synthetic fun create (Ljava/lang/String;)Lnet/mamoe/mirai/utils/MiraiLogger;
public final synthetic fun getTopLevel ()Lnet/mamoe/mirai/utils/MiraiLogger;
public final fun setDefaultLoggerCreator (Lkotlin/jvm/functions/Function1;)V
}
@ -6131,14 +6131,14 @@ public abstract class net/mamoe/mirai/utils/MiraiLoggerPlatformBase : net/mamoe/
public final fun error (Ljava/lang/String;Ljava/lang/Throwable;)V
protected fun error0 (Ljava/lang/String;)V
protected abstract fun error0 (Ljava/lang/String;Ljava/lang/Throwable;)V
public final fun getFollower ()Lnet/mamoe/mirai/utils/MiraiLogger;
public final synthetic fun getFollower ()Lnet/mamoe/mirai/utils/MiraiLogger;
public final fun info (Ljava/lang/String;)V
public final fun info (Ljava/lang/String;Ljava/lang/Throwable;)V
protected fun info0 (Ljava/lang/String;)V
protected abstract fun info0 (Ljava/lang/String;Ljava/lang/Throwable;)V
public fun isEnabled ()Z
public fun plus (Lnet/mamoe/mirai/utils/MiraiLogger;)Lnet/mamoe/mirai/utils/MiraiLogger;
public final fun setFollower (Lnet/mamoe/mirai/utils/MiraiLogger;)V
public synthetic fun plus (Lnet/mamoe/mirai/utils/MiraiLogger;)Lnet/mamoe/mirai/utils/MiraiLogger;
public final synthetic fun setFollower (Lnet/mamoe/mirai/utils/MiraiLogger;)V
public final fun verbose (Ljava/lang/String;)V
public final fun verbose (Ljava/lang/String;Ljava/lang/Throwable;)V
protected fun verbose0 (Ljava/lang/String;)V
@ -6396,7 +6396,7 @@ public final class net/mamoe/mirai/utils/SingleFileLogger : net/mamoe/mirai/util
public fun error (Ljava/lang/String;)V
public fun error (Ljava/lang/String;Ljava/lang/Throwable;)V
public fun error (Ljava/lang/Throwable;)V
public fun getFollower ()Lnet/mamoe/mirai/utils/MiraiLogger;
public synthetic fun getFollower ()Lnet/mamoe/mirai/utils/MiraiLogger;
public fun getIdentity ()Ljava/lang/String;
public fun info (Ljava/lang/String;)V
public fun info (Ljava/lang/String;Ljava/lang/Throwable;)V
@ -6407,8 +6407,8 @@ public final class net/mamoe/mirai/utils/SingleFileLogger : net/mamoe/mirai/util
public fun isInfoEnabled ()Z
public fun isVerboseEnabled ()Z
public fun isWarningEnabled ()Z
public fun plus (Lnet/mamoe/mirai/utils/MiraiLogger;)Lnet/mamoe/mirai/utils/MiraiLogger;
public fun setFollower (Lnet/mamoe/mirai/utils/MiraiLogger;)V
public synthetic fun plus (Lnet/mamoe/mirai/utils/MiraiLogger;)Lnet/mamoe/mirai/utils/MiraiLogger;
public synthetic fun setFollower (Lnet/mamoe/mirai/utils/MiraiLogger;)V
public fun verbose (Ljava/lang/String;)V
public fun verbose (Ljava/lang/String;Ljava/lang/Throwable;)V
public fun verbose (Ljava/lang/Throwable;)V

View File

@ -373,8 +373,8 @@ public abstract interface class net/mamoe/mirai/contact/Group : kotlinx/coroutin
public fun setEssenceMessage (Lnet/mamoe/mirai/message/data/MessageSource;)Z
public abstract fun setEssenceMessage (Lnet/mamoe/mirai/message/data/MessageSource;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public abstract fun setName (Ljava/lang/String;)V
public fun uploadVoice (Lnet/mamoe/mirai/utils/ExternalResource;)Lnet/mamoe/mirai/message/data/Voice;
public abstract fun uploadVoice (Lnet/mamoe/mirai/utils/ExternalResource;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public synthetic fun uploadVoice (Lnet/mamoe/mirai/utils/ExternalResource;)Lnet/mamoe/mirai/message/data/Voice;
public abstract synthetic fun uploadVoice (Lnet/mamoe/mirai/utils/ExternalResource;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
}
public final class net/mamoe/mirai/contact/Group$Companion {
@ -389,14 +389,14 @@ public final class net/mamoe/mirai/contact/GroupKt {
}
public abstract interface class net/mamoe/mirai/contact/GroupSettings {
public abstract fun getEntranceAnnouncement ()Ljava/lang/String;
public abstract synthetic fun getEntranceAnnouncement ()Ljava/lang/String;
public abstract fun isAllowMemberInvite ()Z
public abstract fun isAnonymousChatEnabled ()Z
public abstract fun isAutoApproveEnabled ()Z
public abstract fun isMuteAll ()Z
public abstract fun setAllowMemberInvite (Z)V
public abstract fun setAnonymousChatEnabled (Z)V
public abstract fun setEntranceAnnouncement (Ljava/lang/String;)V
public abstract synthetic fun setEntranceAnnouncement (Ljava/lang/String;)V
public abstract fun setMuteAll (Z)V
}
@ -5911,10 +5911,10 @@ public abstract interface class net/mamoe/mirai/utils/ExternalResource : java/io
public static fun sendTo (Ljava/io/File;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;)Lnet/mamoe/mirai/message/MessageReceipt;
public static fun sendTo (Ljava/io/File;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public fun toAutoCloseable ()Lnet/mamoe/mirai/utils/ExternalResource;
public static fun uploadAsFile (Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;)Lnet/mamoe/mirai/message/data/FileMessage;
public static fun uploadAsFile (Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static fun uploadAsFile (Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;)Lnet/mamoe/mirai/message/data/FileMessage;
public static fun uploadAsFile (Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun uploadAsFile (Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;)Lnet/mamoe/mirai/message/data/FileMessage;
public static synthetic fun uploadAsFile (Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun uploadAsFile (Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;)Lnet/mamoe/mirai/message/data/FileMessage;
public static synthetic fun uploadAsFile (Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static fun uploadAsImage (Ljava/io/File;Lnet/mamoe/mirai/contact/Contact;)Lnet/mamoe/mirai/message/data/Image;
public static fun uploadAsImage (Ljava/io/File;Lnet/mamoe/mirai/contact/Contact;Ljava/lang/String;)Lnet/mamoe/mirai/message/data/Image;
public static fun uploadAsImage (Ljava/io/File;Lnet/mamoe/mirai/contact/Contact;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
@ -5925,12 +5925,12 @@ public abstract interface class net/mamoe/mirai/utils/ExternalResource : java/io
public static fun uploadAsImage (Ljava/io/InputStream;Lnet/mamoe/mirai/contact/Contact;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static fun uploadAsImage (Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/contact/Contact;)Lnet/mamoe/mirai/message/data/Image;
public static fun uploadAsImage (Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/contact/Contact;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static fun uploadAsVoice (Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/contact/Contact;)Lnet/mamoe/mirai/message/data/Voice;
public static fun uploadAsVoice (Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/contact/Contact;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static fun uploadTo (Ljava/io/File;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;)Lnet/mamoe/mirai/message/data/FileMessage;
public static fun uploadTo (Ljava/io/File;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static fun uploadTo (Ljava/io/File;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;)Lnet/mamoe/mirai/message/data/FileMessage;
public static fun uploadTo (Ljava/io/File;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun uploadAsVoice (Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/contact/Contact;)Lnet/mamoe/mirai/message/data/Voice;
public static synthetic fun uploadAsVoice (Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/contact/Contact;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun uploadTo (Ljava/io/File;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;)Lnet/mamoe/mirai/message/data/FileMessage;
public static synthetic fun uploadTo (Ljava/io/File;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun uploadTo (Ljava/io/File;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;)Lnet/mamoe/mirai/message/data/FileMessage;
public static synthetic fun uploadTo (Ljava/io/File;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
}
public final class net/mamoe/mirai/utils/ExternalResource$Companion {
@ -5975,10 +5975,10 @@ public final class net/mamoe/mirai/utils/ExternalResource$Companion {
public final fun sendTo (Ljava/io/File;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun sendTo$default (Lnet/mamoe/mirai/utils/ExternalResource$Companion;Ljava/io/File;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;ILjava/lang/Object;)Lnet/mamoe/mirai/message/MessageReceipt;
public static synthetic fun sendTo$default (Lnet/mamoe/mirai/utils/ExternalResource$Companion;Ljava/io/File;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public final fun uploadAsFile (Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;)Lnet/mamoe/mirai/message/data/FileMessage;
public final fun uploadAsFile (Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public final fun uploadAsFile (Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;)Lnet/mamoe/mirai/message/data/FileMessage;
public final fun uploadAsFile (Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public final synthetic fun uploadAsFile (Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;)Lnet/mamoe/mirai/message/data/FileMessage;
public final synthetic fun uploadAsFile (Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public final synthetic fun uploadAsFile (Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;)Lnet/mamoe/mirai/message/data/FileMessage;
public final synthetic fun uploadAsFile (Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun uploadAsFile$default (Lnet/mamoe/mirai/utils/ExternalResource$Companion;Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;ILjava/lang/Object;)Lnet/mamoe/mirai/message/data/FileMessage;
public static synthetic fun uploadAsFile$default (Lnet/mamoe/mirai/utils/ExternalResource$Companion;Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public final fun uploadAsImage (Ljava/io/File;Lnet/mamoe/mirai/contact/Contact;)Lnet/mamoe/mirai/message/data/Image;
@ -5995,12 +5995,12 @@ public final class net/mamoe/mirai/utils/ExternalResource$Companion {
public static synthetic fun uploadAsImage$default (Lnet/mamoe/mirai/utils/ExternalResource$Companion;Ljava/io/File;Lnet/mamoe/mirai/contact/Contact;Ljava/lang/String;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static synthetic fun uploadAsImage$default (Lnet/mamoe/mirai/utils/ExternalResource$Companion;Ljava/io/InputStream;Lnet/mamoe/mirai/contact/Contact;Ljava/lang/String;ILjava/lang/Object;)Lnet/mamoe/mirai/message/data/Image;
public static synthetic fun uploadAsImage$default (Lnet/mamoe/mirai/utils/ExternalResource$Companion;Ljava/io/InputStream;Lnet/mamoe/mirai/contact/Contact;Ljava/lang/String;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public final fun uploadAsVoice (Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/contact/Contact;)Lnet/mamoe/mirai/message/data/Voice;
public final fun uploadAsVoice (Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/contact/Contact;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public final fun uploadTo (Ljava/io/File;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;)Lnet/mamoe/mirai/message/data/FileMessage;
public final fun uploadTo (Ljava/io/File;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public final fun uploadTo (Ljava/io/File;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;)Lnet/mamoe/mirai/message/data/FileMessage;
public final fun uploadTo (Ljava/io/File;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public final synthetic fun uploadAsVoice (Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/contact/Contact;)Lnet/mamoe/mirai/message/data/Voice;
public final synthetic fun uploadAsVoice (Lnet/mamoe/mirai/utils/ExternalResource;Lnet/mamoe/mirai/contact/Contact;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public final synthetic fun uploadTo (Ljava/io/File;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;)Lnet/mamoe/mirai/message/data/FileMessage;
public final synthetic fun uploadTo (Ljava/io/File;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public final synthetic fun uploadTo (Ljava/io/File;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;)Lnet/mamoe/mirai/message/data/FileMessage;
public final synthetic fun uploadTo (Ljava/io/File;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun uploadTo$default (Lnet/mamoe/mirai/utils/ExternalResource$Companion;Ljava/io/File;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;ILjava/lang/Object;)Lnet/mamoe/mirai/message/data/FileMessage;
public static synthetic fun uploadTo$default (Lnet/mamoe/mirai/utils/ExternalResource$Companion;Ljava/io/File;Lnet/mamoe/mirai/contact/FileSupported;Ljava/lang/String;Lnet/mamoe/mirai/utils/RemoteFile$ProgressionCallback;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
}
@ -6069,14 +6069,14 @@ public abstract interface class net/mamoe/mirai/utils/MiraiLogger {
public static final field Companion Lnet/mamoe/mirai/utils/MiraiLogger$Companion;
public fun call (Lnet/mamoe/mirai/utils/SimpleLogger$LogPriority;Ljava/lang/String;Ljava/lang/Throwable;)V
public static synthetic fun call$default (Lnet/mamoe/mirai/utils/MiraiLogger;Lnet/mamoe/mirai/utils/SimpleLogger$LogPriority;Ljava/lang/String;Ljava/lang/Throwable;ILjava/lang/Object;)V
public static fun create (Ljava/lang/String;)Lnet/mamoe/mirai/utils/MiraiLogger;
public static synthetic fun create (Ljava/lang/String;)Lnet/mamoe/mirai/utils/MiraiLogger;
public abstract fun debug (Ljava/lang/String;)V
public abstract fun debug (Ljava/lang/String;Ljava/lang/Throwable;)V
public fun debug (Ljava/lang/Throwable;)V
public abstract fun error (Ljava/lang/String;)V
public abstract fun error (Ljava/lang/String;Ljava/lang/Throwable;)V
public fun error (Ljava/lang/Throwable;)V
public fun getFollower ()Lnet/mamoe/mirai/utils/MiraiLogger;
public synthetic fun getFollower ()Lnet/mamoe/mirai/utils/MiraiLogger;
public abstract fun getIdentity ()Ljava/lang/String;
public abstract fun info (Ljava/lang/String;)V
public abstract fun info (Ljava/lang/String;Ljava/lang/Throwable;)V
@ -6087,9 +6087,9 @@ public abstract interface class net/mamoe/mirai/utils/MiraiLogger {
public fun isInfoEnabled ()Z
public fun isVerboseEnabled ()Z
public fun isWarningEnabled ()Z
public fun plus (Lnet/mamoe/mirai/utils/MiraiLogger;)Lnet/mamoe/mirai/utils/MiraiLogger;
public synthetic fun plus (Lnet/mamoe/mirai/utils/MiraiLogger;)Lnet/mamoe/mirai/utils/MiraiLogger;
public static fun setDefaultLoggerCreator (Lkotlin/jvm/functions/Function1;)V
public fun setFollower (Lnet/mamoe/mirai/utils/MiraiLogger;)V
public synthetic fun setFollower (Lnet/mamoe/mirai/utils/MiraiLogger;)V
public abstract fun verbose (Ljava/lang/String;)V
public abstract fun verbose (Ljava/lang/String;Ljava/lang/Throwable;)V
public fun verbose (Ljava/lang/Throwable;)V
@ -6099,8 +6099,8 @@ public abstract interface class net/mamoe/mirai/utils/MiraiLogger {
}
public final class net/mamoe/mirai/utils/MiraiLogger$Companion {
public final fun create (Ljava/lang/String;)Lnet/mamoe/mirai/utils/MiraiLogger;
public final fun getTopLevel ()Lnet/mamoe/mirai/utils/MiraiLogger;
public final synthetic fun create (Ljava/lang/String;)Lnet/mamoe/mirai/utils/MiraiLogger;
public final synthetic fun getTopLevel ()Lnet/mamoe/mirai/utils/MiraiLogger;
public final fun setDefaultLoggerCreator (Lkotlin/jvm/functions/Function1;)V
}
@ -6131,14 +6131,14 @@ public abstract class net/mamoe/mirai/utils/MiraiLoggerPlatformBase : net/mamoe/
public final fun error (Ljava/lang/String;Ljava/lang/Throwable;)V
protected fun error0 (Ljava/lang/String;)V
protected abstract fun error0 (Ljava/lang/String;Ljava/lang/Throwable;)V
public final fun getFollower ()Lnet/mamoe/mirai/utils/MiraiLogger;
public final synthetic fun getFollower ()Lnet/mamoe/mirai/utils/MiraiLogger;
public final fun info (Ljava/lang/String;)V
public final fun info (Ljava/lang/String;Ljava/lang/Throwable;)V
protected fun info0 (Ljava/lang/String;)V
protected abstract fun info0 (Ljava/lang/String;Ljava/lang/Throwable;)V
public fun isEnabled ()Z
public fun plus (Lnet/mamoe/mirai/utils/MiraiLogger;)Lnet/mamoe/mirai/utils/MiraiLogger;
public final fun setFollower (Lnet/mamoe/mirai/utils/MiraiLogger;)V
public synthetic fun plus (Lnet/mamoe/mirai/utils/MiraiLogger;)Lnet/mamoe/mirai/utils/MiraiLogger;
public final synthetic fun setFollower (Lnet/mamoe/mirai/utils/MiraiLogger;)V
public final fun verbose (Ljava/lang/String;)V
public final fun verbose (Ljava/lang/String;Ljava/lang/Throwable;)V
protected fun verbose0 (Ljava/lang/String;)V

View File

@ -48,8 +48,11 @@ public class BotIsBeingMutedException @MiraiInternalApi constructor(
public override val target: Group,
originalMessage: Message,
) : SendMessageFailedException(target, Reason.BOT_MUTED, originalMessage) {
@DeprecatedSinceMirai(warningSince = "2.9")
@Deprecated("Deprecated without replacement. Please consider copy this exception to your code.")
@DeprecatedSinceMirai(warningSince = "2.9", errorSince = "2.11")
@Deprecated(
"Deprecated without replacement. Please consider copy this exception to your code.",
level = DeprecationLevel.ERROR
)
// this constructor is since 2.0
public constructor(
target: Group,

View File

@ -1,5 +1,5 @@
/*
* Copyright 2019-2021 Mamoe Technologies and contributors.
* Copyright 2019-2022 Mamoe Technologies and contributors.
*
* 此源代码的使用受 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.
@ -192,10 +192,10 @@ public interface Group : Contact, CoroutineScope, FileSupported, AudioSupported
@Deprecated(
"use uploadAudio",
replaceWith = ReplaceWith("uploadAudio(resource)"),
level = DeprecationLevel.ERROR
level = DeprecationLevel.HIDDEN
) // deprecated since 2.7
@DeprecatedSinceMirai(warningSince = "2.7", errorSince = "2.10")
public suspend fun uploadVoice(resource: ExternalResource): Voice
@DeprecatedSinceMirai(warningSince = "2.7", errorSince = "2.10", hiddenSince = "2.11")
public suspend fun uploadVoice(resource: ExternalResource): net.mamoe.mirai.message.data.Voice
/**
* 将一条消息设置为群精华消息, 需要管理员或群主权限.
@ -240,10 +240,10 @@ public interface GroupSettings {
* @see Group.announcements
*/
@Deprecated(
level = DeprecationLevel.ERROR,
level = DeprecationLevel.HIDDEN,
message = "group.announcements.asFlow().filter { it.parameters.sendToNewMember }.firstOrNull()",
) // deprecated since 2.7
@DeprecatedSinceMirai(warningSince = "2.7", errorSince = "2.10")
@DeprecatedSinceMirai(warningSince = "2.7", errorSince = "2.10", hiddenSince = "2.11")
public var entranceAnnouncement: String
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2019-2021 Mamoe Technologies and contributors.
* Copyright 2019-2022 Mamoe Technologies and contributors.
*
* 此源代码的使用受 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.
@ -120,7 +120,7 @@ private val builtInSerializersModule by lazy {
// subclass(PttMessage::class, PttMessage.serializer())
@Suppress("DEPRECATION_ERROR")
subclass(Voice::class, Voice.serializer())
subclass(net.mamoe.mirai.message.data.Voice::class, net.mamoe.mirai.message.data.Voice.serializer())
// subclass(HummerMessage::class, HummerMessage.serializer())
subclass(PokeMessage::class, PokeMessage.serializer())

View File

@ -1,5 +1,5 @@
/*
* Copyright 2019-2021 Mamoe Technologies and contributors.
* Copyright 2019-2022 Mamoe Technologies and contributors.
*
* 此源代码的使用受 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.
@ -69,9 +69,9 @@ public abstract class PttMessage : MessageContent {
@Deprecated(
"Please use Audio instead.",
replaceWith = ReplaceWith("Audio", "net.mamoe.mirai.message.data.Audio"),
level = DeprecationLevel.ERROR
level = DeprecationLevel.HIDDEN
) // deprecated since 2.7
@DeprecatedSinceMirai(warningSince = "2.7", errorSince = "2.10")
@DeprecatedSinceMirai(warningSince = "2.7", errorSince = "2.10", hiddenSince = "2.11")
public open class Voice @MiraiInternalApi constructor(
@MiraiExperimentalApi public override val fileName: String,
@MiraiExperimentalApi public override val md5: ByteArray,
@ -84,9 +84,9 @@ public open class Voice @MiraiInternalApi constructor(
@Deprecated(
"Please use Audio instead.",
replaceWith = ReplaceWith("Audio.Key", "net.mamoe.mirai.message.data.Audio.Key"),
level = DeprecationLevel.ERROR
level = DeprecationLevel.HIDDEN
) // deprecated since 2.7
@DeprecatedSinceMirai(warningSince = "2.7", errorSince = "2.10")
@DeprecatedSinceMirai(warningSince = "2.7", errorSince = "2.10", hiddenSince = "2.11")
public companion object Key : AbstractPolymorphicMessageKey<PttMessage, Voice>(PttMessage, { it.safeCast() }) {
public const val SERIAL_NAME: String = "Voice"
@ -101,7 +101,10 @@ public open class Voice @MiraiInternalApi constructor(
"Please consider migrating to Audio",
level = DeprecationLevel.ERROR
) // deprecated since 2.7
@DeprecatedSinceMirai(warningSince = "2.7", errorSince = "2.10")
@DeprecatedSinceMirai(
warningSince = "2.7",
errorSince = "2.10"
) // if HIDDEN, it cannot be resolved by Audio.toVoice
@JvmStatic
public fun fromAudio(audio: Audio): Voice {
audio.run {
@ -186,5 +189,5 @@ public open class Voice @MiraiInternalApi constructor(
level = DeprecationLevel.ERROR
) // deprecated since 2.7
@JvmSynthetic
@DeprecatedSinceMirai(warningSince = "2.7", errorSince = "2.10")
@DeprecatedSinceMirai(warningSince = "2.7", errorSince = "2.10", hiddenSince = "2.11")
public inline fun Audio.toVoice(): Voice = Voice.fromAudio(this)

View File

@ -26,6 +26,7 @@ import net.mamoe.mirai.message.MessageReceipt
import net.mamoe.mirai.message.data.FileMessage
import net.mamoe.mirai.message.data.Image
import net.mamoe.mirai.message.data.sendTo
import net.mamoe.mirai.message.data.toVoice
import net.mamoe.mirai.utils.AbstractExternalResource.ResourceCleanCallback
import net.mamoe.mirai.utils.ExternalResource.Companion.sendAsImageTo
import net.mamoe.mirai.utils.ExternalResource.Companion.toExternalResource
@ -479,9 +480,9 @@ public interface ExternalResource : Closeable {
"this.sendTo(contact, path, callback)",
"net.mamoe.mirai.utils.ExternalResource.Companion.sendTo"
),
level = DeprecationLevel.ERROR
level = DeprecationLevel.HIDDEN
) // deprecated since 2.7-M1
@DeprecatedSinceMirai(warningSince = "2.7", errorSince = "2.10")
@DeprecatedSinceMirai(warningSince = "2.7", errorSince = "2.10", hiddenSince = "2.11")
public suspend fun File.uploadTo(
contact: FileSupported,
path: String,
@ -516,9 +517,9 @@ public interface ExternalResource : Closeable {
"this.sendAsFileTo(contact, path, callback)",
"net.mamoe.mirai.utils.ExternalResource.Companion.sendAsFileTo"
),
level = DeprecationLevel.ERROR
level = DeprecationLevel.HIDDEN
) // deprecated since 2.7-M1
@DeprecatedSinceMirai(warningSince = "2.7", errorSince = "2.10")
@DeprecatedSinceMirai(warningSince = "2.7", errorSince = "2.10", hiddenSince = "2.11")
public suspend fun ExternalResource.uploadAsFile(
contact: FileSupported,
path: String,
@ -599,12 +600,12 @@ public interface ExternalResource : Closeable {
@JvmStatic
@Deprecated(
"Use `contact.uploadAudio(resource)` instead",
level = DeprecationLevel.ERROR
level = DeprecationLevel.HIDDEN
) // deprecated since 2.7
@DeprecatedSinceMirai(warningSince = "2.7", errorSince = "2.10")
@DeprecatedSinceMirai(warningSince = "2.7", errorSince = "2.10", hiddenSince = "2.11")
public suspend fun ExternalResource.uploadAsVoice(contact: Contact): net.mamoe.mirai.message.data.Voice {
@Suppress("DEPRECATION")
if (contact is Group) return contact.uploadVoice(this)
@Suppress("DEPRECATION", "DEPRECATION_ERROR")
if (contact is Group) return contact.uploadAudio(this).toVoice()
else throw UnsupportedOperationException("Contact `$contact` is not supported uploading voice")
}
// endregion

View File

@ -1,10 +1,10 @@
/*
* Copyright 2019-2021 Mamoe Technologies and contributors.
* Copyright 2019-2022 Mamoe Technologies and contributors.
*
* 此源代码的使用受 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.
* 此源代码的使用受 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.
*
* https://github.com/mamoe/mirai/blob/master/LICENSE
* https://github.com/mamoe/mirai/blob/dev/LICENSE
*/
@file:Suppress("unused")
@ -94,8 +94,8 @@ public interface MiraiLogger {
*/
@MiraiInternalApi
@MiraiExperimentalApi
@Deprecated("Deprecated.", level = DeprecationLevel.ERROR) // deprecated since 2.7
@DeprecatedSinceMirai(warningSince = "2.7", errorSince = "2.10")
@Deprecated("Deprecated.", level = DeprecationLevel.HIDDEN) // deprecated since 2.7
@DeprecatedSinceMirai(warningSince = "2.7", errorSince = "2.10", hiddenSince = "2.11")
public val TopLevel: MiraiLogger by lazy { Factory.create(MiraiLogger::class, "Mirai") }
/**
@ -107,7 +107,7 @@ public interface MiraiLogger {
level = DeprecationLevel.ERROR
) // deprecated since 2.7
@JvmStatic
@DeprecatedSinceMirai(warningSince = "2.7", errorSince = "2.10")
@DeprecatedSinceMirai(warningSince = "2.7", errorSince = "2.10") // left ERROR intentionally, for internal uses.
public fun setDefaultLoggerCreator(creator: (identity: String?) -> MiraiLogger) {
DefaultFactoryOverrides.override { _, identity -> creator(identity) }
}
@ -121,10 +121,10 @@ public interface MiraiLogger {
"Please use MiraiLogger.Factory.create", ReplaceWith(
"MiraiLogger.Factory.create(YourClass::class, identity)",
"net.mamoe.mirai.utils.MiraiLogger"
), level = DeprecationLevel.ERROR
), level = DeprecationLevel.HIDDEN
) // deprecated since 2.7
@JvmStatic
@DeprecatedSinceMirai(warningSince = "2.7", errorSince = "2.10")
@DeprecatedSinceMirai(warningSince = "2.7", errorSince = "2.10", hiddenSince = "2.11")
public fun create(identity: String?): MiraiLogger = Factory.create(MiraiLogger::class, identity)
}
@ -211,8 +211,8 @@ public interface MiraiLogger {
* 当然, 多个 logger 也可以加在一起: `val logger = bot.logger + MynLogger() + MyLogger2()`
*/
@Suppress("UNUSED_PARAMETER")
@Deprecated("follower 设计不佳, 请避免使用", level = DeprecationLevel.ERROR) // deprecated since 2.7
@DeprecatedSinceMirai(warningSince = "2.7", errorSince = "2.10")
@Deprecated("follower 设计不佳, 请避免使用", level = DeprecationLevel.HIDDEN) // deprecated since 2.7
@DeprecatedSinceMirai(warningSince = "2.7", errorSince = "2.10", hiddenSince = "2.11")
public var follower: MiraiLogger?
get() = null
set(value) {}
@ -278,8 +278,8 @@ public interface MiraiLogger {
* @return [follower]
*/
@Suppress("DeprecatedCallableAddReplaceWith")
@Deprecated("plus 设计不佳, 请避免使用.", level = DeprecationLevel.ERROR) // deprecated since 2.7
@DeprecatedSinceMirai(warningSince = "2.7", errorSince = "2.10")
@Deprecated("plus 设计不佳, 请避免使用.", level = DeprecationLevel.HIDDEN) // deprecated since 2.7
@DeprecatedSinceMirai(warningSince = "2.7", errorSince = "2.10", hiddenSince = "2.11")
public operator fun <T : MiraiLogger> plus(follower: T): T = follower
}
@ -474,67 +474,57 @@ public abstract class MiraiLoggerPlatformBase : MiraiLogger {
public override val isEnabled: Boolean get() = true
@Suppress("OverridingDeprecatedMember")
@Deprecated("follower 设计不佳, 请避免使用", level = DeprecationLevel.ERROR) // deprecated since 2.7
@DeprecatedSinceMirai(warningSince = "2.7", errorSince = "2.10")
@Deprecated("follower 设计不佳, 请避免使用", level = DeprecationLevel.HIDDEN) // deprecated since 2.7
@DeprecatedSinceMirai(warningSince = "2.7", errorSince = "2.10", hiddenSince = "2.11")
public final override var follower: MiraiLogger? = null
public final override fun verbose(message: String?) {
if (!isEnabled) return
follower?.verbose(message)
verbose0(message)
}
public final override fun verbose(message: String?, e: Throwable?) {
if (!isEnabled) return
follower?.verbose(message, e)
verbose0(message, e)
}
public final override fun debug(message: String?) {
if (!isEnabled) return
follower?.debug(message)
debug0(message)
}
public final override fun debug(message: String?, e: Throwable?) {
if (!isEnabled) return
follower?.debug(message, e)
debug0(message, e)
}
public final override fun info(message: String?) {
if (!isEnabled) return
follower?.info(message)
info0(message)
}
public final override fun info(message: String?, e: Throwable?) {
if (!isEnabled) return
follower?.info(message, e)
info0(message, e)
}
public final override fun warning(message: String?) {
if (!isEnabled) return
follower?.warning(message)
warning0(message)
}
public final override fun warning(message: String?, e: Throwable?) {
if (!isEnabled) return
follower?.warning(message, e)
warning0(message, e)
}
public final override fun error(message: String?) {
if (!isEnabled) return
follower?.error(message)
error0(message)
}
public final override fun error(message: String?, e: Throwable?) {
if (!isEnabled) return
follower?.error(message, e)
error0(message, e)
}
@ -550,10 +540,9 @@ public abstract class MiraiLoggerPlatformBase : MiraiLogger {
protected abstract fun error0(message: String?, e: Throwable?)
@Suppress("OverridingDeprecatedMember")
@Deprecated("plus 设计不佳, 请避免使用.", level = DeprecationLevel.ERROR) // deprecated since 2.7
@DeprecatedSinceMirai(warningSince = "2.7", errorSince = "2.10")
@Deprecated("plus 设计不佳, 请避免使用.", level = DeprecationLevel.HIDDEN) // deprecated since 2.7
@DeprecatedSinceMirai(warningSince = "2.7", errorSince = "2.10", hiddenSince = "2.11")
public override operator fun <T : MiraiLogger> plus(follower: T): T {
this.follower = follower
return follower
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright 2019-2021 Mamoe Technologies and contributors.
* Copyright 2019-2022 Mamoe Technologies and contributors.
*
* 此源代码的使用受 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.
@ -458,7 +458,7 @@ public interface RemoteFile {
@Deprecated(
"Use uploadAndSend instead.", ReplaceWith("this.uploadAndSend(resource, callback)"), DeprecationLevel.ERROR
) // deprecated since 2.7-M1
@DeprecatedSinceMirai(warningSince = "2.7", errorSince = "2.10")
@DeprecatedSinceMirai(warningSince = "2.7", errorSince = "2.10") // left ERROR intentionally
public suspend fun upload(
resource: ExternalResource,
callback: ProgressionCallback? = null,
@ -474,7 +474,7 @@ public interface RemoteFile {
@Deprecated(
"Use uploadAndSend instead.", ReplaceWith("this.uploadAndSend(resource)"), DeprecationLevel.ERROR
) // deprecated since 2.7-M1
@DeprecatedSinceMirai(warningSince = "2.7", errorSince = "2.10")
@DeprecatedSinceMirai(warningSince = "2.7", errorSince = "2.10") // left ERROR intentionally
public suspend fun upload(resource: ExternalResource): FileMessage = upload(resource, null)
/**
@ -487,7 +487,7 @@ public interface RemoteFile {
@Deprecated(
"Use uploadAndSend instead.", ReplaceWith("this.uploadAndSend(file, callback)"), DeprecationLevel.ERROR
) // deprecated since 2.7-M1
@DeprecatedSinceMirai(warningSince = "2.7", errorSince = "2.10")
@DeprecatedSinceMirai(warningSince = "2.7", errorSince = "2.10") // left ERROR intentionally
public suspend fun upload(
file: File,
callback: ProgressionCallback? = null,
@ -503,7 +503,7 @@ public interface RemoteFile {
@Deprecated(
"Use sendFile instead.", ReplaceWith("this.uploadAndSend(file)"), DeprecationLevel.ERROR
) // deprecated since 2.7-M1
@DeprecatedSinceMirai(warningSince = "2.7", errorSince = "2.10")
@DeprecatedSinceMirai(warningSince = "2.7", errorSince = "2.10") // left ERROR intentionally
public suspend fun upload(file: File): FileMessage = file.toExternalResource().use { upload(it) }
/**
@ -586,7 +586,7 @@ public interface RemoteFile {
),
level = DeprecationLevel.ERROR
) // deprecated since 2.7-M1
@DeprecatedSinceMirai(warningSince = "2.7", errorSince = "2.10")
@DeprecatedSinceMirai(warningSince = "2.7", errorSince = "2.10") // left ERROR intentionally
public suspend fun FileSupported.uploadFile(
path: String,
resource: ExternalResource,
@ -611,7 +611,7 @@ public interface RemoteFile {
),
level = DeprecationLevel.ERROR
) // deprecated since 2.7-M1
@DeprecatedSinceMirai(warningSince = "2.7", errorSince = "2.10")
@DeprecatedSinceMirai(warningSince = "2.7", errorSince = "2.10") // left ERROR intentionally
public suspend fun FileSupported.uploadFile(
path: String,
file: File,

View File

@ -1,5 +1,5 @@
/*
* Copyright 2019-2021 Mamoe Technologies and contributors.
* Copyright 2019-2022 Mamoe Technologies and contributors.
*
* 此源代码的使用受 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.
@ -21,13 +21,8 @@ import net.mamoe.mirai.utils.DeprecatedSinceMirai
/**
* QQ for Android
*/
@Deprecated(
"BotFactoryImpl was accidentally made public, use BotFactory.INSTANCE instead",
ReplaceWith("BotFactory", "net.mamoe.mirai.BotFactory"),
DeprecationLevel.ERROR,
)
@DeprecatedSinceMirai(errorSince = "2.10")
public object BotFactoryImpl : BotFactory {
@DeprecatedSinceMirai(errorSince = "2.10", internalSince = "2.11")
internal object BotFactoryImpl : BotFactory {
/**
* 使用指定的 [配置][configuration] 构造 [Bot] 实例

View File

@ -138,7 +138,6 @@ internal open class MiraiImpl : IMirai, LowLevelApiAccessor {
}
}
@Suppress("DEPRECATION_ERROR")
override val BotFactory: BotFactory
get() = BotFactoryImpl

View File

@ -280,24 +280,26 @@ internal class GroupImpl constructor(
}
}
@Suppress("OverridingDeprecatedMember", "DEPRECATION")
override suspend fun uploadVoice(resource: ExternalResource): Voice = AudioToSilkService.convert(
resource
).useAutoClose { res ->
return bot.network.run {
uploadAudioResource(res)
@Deprecated("use uploadAudio", replaceWith = ReplaceWith("uploadAudio(resource)"), level = DeprecationLevel.HIDDEN)
@Suppress("OverridingDeprecatedMember", "DEPRECATION", "DEPRECATION_ERROR")
override suspend fun uploadVoice(resource: ExternalResource): net.mamoe.mirai.message.data.Voice =
AudioToSilkService.convert(
resource
).useAutoClose { res ->
return bot.network.run {
uploadAudioResource(res)
// val body = resp?.loadAs(Cmd0x388.RspBody.serializer())
// ?.msgTryupPttRsp
// ?.singleOrNull()?.fileKey ?: error("Group voice highway transfer succeed but failed to find fileKey")
// val body = resp?.loadAs(Cmd0x388.RspBody.serializer())
// ?.msgTryupPttRsp
// ?.singleOrNull()?.fileKey ?: error("Group voice highway transfer succeed but failed to find fileKey")
Voice(
"${res.md5.toUHexString("")}.amr",
res.md5,
res.size,
res.voiceCodec,
""
)
net.mamoe.mirai.message.data.Voice(
"${res.md5.toUHexString("")}.amr",
res.md5,
res.size,
res.voiceCodec,
""
)
}
}

View File

@ -1,10 +1,10 @@
/*
* Copyright 2019-2021 Mamoe Technologies and contributors.
* Copyright 2019-2022 Mamoe Technologies and contributors.
*
* 此源代码的使用受 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.
* 此源代码的使用受 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.
*
* https://github.com/mamoe/mirai/blob/master/LICENSE
* https://github.com/mamoe/mirai/blob/dev/LICENSE
*/
package net.mamoe.mirai.internal.network.protocol.packet.chat.receive
@ -163,7 +163,7 @@ internal object MessageSvcPbSendMsg : OutgoingPacketFactory<MessageSvcPbSendMsg.
pbReserve = byteArrayOf(0),
format = let {
@Suppress("DEPRECATION_ERROR")
if (it is Voice) {
if (it is net.mamoe.mirai.message.data.Voice) {
it._codec
} else {
0

View File

@ -1,5 +1,5 @@
/*
* Copyright 2019-2021 Mamoe Technologies and contributors.
* Copyright 2019-2022 Mamoe Technologies and contributors.
*
* 此源代码的使用受 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.
@ -11,7 +11,6 @@
package net.mamoe.mirai.internal.utils
import net.mamoe.mirai.utils.DeprecatedSinceMirai
import net.mamoe.mirai.utils.MiraiLogger
import net.mamoe.mirai.utils.debug
import net.mamoe.mirai.utils.loadService
@ -19,15 +18,6 @@ import net.mamoe.mirai.utils.loadService
internal fun Any?.structureToString(): String = StructureToStringTransformer.instance.transform(this)
@Suppress("FunctionName")
@Deprecated(
"",
ReplaceWith("this.structureToString()", "net.mamoe.mirai.internal.utils.structureToString"),
level = DeprecationLevel.ERROR
) // kept for local developers for some time
@DeprecatedSinceMirai(errorSince = "2.10")
internal fun Any?._miraiContentToString(): String = this.structureToString()
private val SoutvLogger: MiraiLogger by lazy {
MiraiLogger.Factory.create(
StructureToStringTransformer::class,
@ -35,14 +25,6 @@ private val SoutvLogger: MiraiLogger by lazy {
)
}
@Deprecated(
"",
ReplaceWith("this.printStructure(name)", "net.mamoe.mirai.internal.utils.printStructure"),
level = DeprecationLevel.ERROR
)
@DeprecatedSinceMirai(errorSince = "2.10")
internal fun Any?.soutv(name: String = "unnamed") = this.printStructure(name)
internal fun Any?.printStructure(name: String = "unnamed") {
return SoutvLogger.debug { "$name = ${this.structureToString()}" }
}