[core] add group level api (#2115)

* add: api dump

* feat: Member.level

* add: api dump

* rename: level to rank

* feat: rank show

* feat: honor flag

* fix: honor flag index

* feat: record and chart

* feat: flag and docs

* add: api dump

* fix: active

* fix: honor

* fix: active

* fix: rebase

* fix: docs

* feat: MemberActive

* fix: for review

* feat: other notification

* remove: low level api

* add: since and api dump

* add: since

* for: review

* add: event sync

* fix: name and docs

* fix: api dump

* fix: for review

* add: ActiveRank, MemberMedal close #2233

* fix: active for review

* improve public API for inlined GroupHonorType

* Change `@since 2.13.0` to `@since 2.13`

* dump api changes

* implement mock framework for Active

* change `GroupActive.flush` to `GroupActive.refresh`

* improve docs for GroupActive

* remove unnecessary expect/actual for MemberActive

* change property names in GroupInfo

* check permission in MockGroupActiveImpl

* optimize member names in  CommonGroupActiveImpl

* fix error checking

* dump api

Co-authored-by: Him188 <Him188@mamoe.net>
This commit is contained in:
cssxsh 2022-09-21 23:18:50 +08:00 committed by GitHub
parent aa40f3f3d7
commit d000f2ea0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
49 changed files with 2856 additions and 1583 deletions

View File

@ -130,8 +130,6 @@ public abstract interface class net/mamoe/mirai/IMirai : net/mamoe/mirai/LowLeve
public abstract interface class net/mamoe/mirai/LowLevelApiAccessor {
public fun getGroupVoiceDownloadUrl (Lnet/mamoe/mirai/Bot;[BJJ)Ljava/lang/String;
public abstract fun getGroupVoiceDownloadUrl (Lnet/mamoe/mirai/Bot;[BJJLkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun getRawGroupActiveData$default (Lnet/mamoe/mirai/LowLevelApiAccessor;Lnet/mamoe/mirai/Bot;JIILjava/lang/Object;)Lnet/mamoe/mirai/data/GroupActiveData;
public static synthetic fun getRawGroupActiveData$default (Lnet/mamoe/mirai/LowLevelApiAccessor;Lnet/mamoe/mirai/Bot;JILkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public fun getRawGroupList (Lnet/mamoe/mirai/Bot;)Lkotlin/sequences/Sequence;
public abstract fun getRawGroupList (Lnet/mamoe/mirai/Bot;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public fun getRawGroupMemberList (Lnet/mamoe/mirai/Bot;JJJ)Lkotlin/sequences/Sequence;
@ -374,6 +372,7 @@ public abstract interface class net/mamoe/mirai/contact/Group : kotlinx/coroutin
public abstract fun contains (J)Z
public fun contains (Lnet/mamoe/mirai/contact/NormalMember;)Z
public abstract fun get (J)Lnet/mamoe/mirai/contact/NormalMember;
public abstract fun getActive ()Lnet/mamoe/mirai/contact/active/GroupActive;
public abstract fun getAnnouncements ()Lnet/mamoe/mirai/contact/announcement/Announcements;
public fun getAvatarUrl ()Ljava/lang/String;
public synthetic fun getAvatarUrl (Lnet/mamoe/mirai/contact/AvatarSpec;)Ljava/lang/String;
@ -426,10 +425,13 @@ public abstract interface class net/mamoe/mirai/contact/GroupSettings {
}
public abstract interface class net/mamoe/mirai/contact/Member : net/mamoe/mirai/contact/User {
public abstract fun getActive ()Lnet/mamoe/mirai/contact/active/MemberActive;
public abstract fun getGroup ()Lnet/mamoe/mirai/contact/Group;
public abstract fun getNameCard ()Ljava/lang/String;
public abstract fun getPermission ()Lnet/mamoe/mirai/contact/MemberPermission;
public fun getRankTitle ()Ljava/lang/String;
public abstract fun getSpecialTitle ()Ljava/lang/String;
public fun getTemperatureTitle ()Ljava/lang/String;
public fun mute (I)V
public abstract fun mute (ILkotlin/coroutines/Continuation;)Ljava/lang/Object;
public abstract fun nudge ()Lnet/mamoe/mirai/message/action/MemberNudge;
@ -618,6 +620,99 @@ public abstract interface class net/mamoe/mirai/contact/UserOrBot : net/mamoe/mi
public abstract fun nudge ()Lnet/mamoe/mirai/message/action/Nudge;
}
public final class net/mamoe/mirai/contact/active/ActiveChart {
public final fun getActives ()Ljava/util/Map;
public final fun getExit ()Ljava/util/Map;
public final fun getJoin ()Ljava/util/Map;
public final fun getMembers ()Ljava/util/Map;
public final fun getSentences ()Ljava/util/Map;
}
public final class net/mamoe/mirai/contact/active/ActiveHonorInfo {
public final fun getAvatar ()Ljava/lang/String;
public final fun getHistoryDays ()I
public final fun getMaxTermDays ()I
public final fun getMember ()Lnet/mamoe/mirai/contact/NormalMember;
public final fun getMemberId ()J
public final fun getMemberName ()Ljava/lang/String;
public final fun getTermDays ()I
}
public final class net/mamoe/mirai/contact/active/ActiveHonorList {
public final fun getCurrent ()Lnet/mamoe/mirai/contact/active/ActiveHonorInfo;
public final fun getRecords ()Ljava/util/List;
public final fun getType ()I
}
public final class net/mamoe/mirai/contact/active/ActiveRankRecord {
public final fun getMember ()Lnet/mamoe/mirai/contact/NormalMember;
public final fun getMemberId ()J
public final fun getMemberName ()Ljava/lang/String;
public final fun getScore ()I
public final fun getTemperature ()I
}
public final class net/mamoe/mirai/contact/active/ActiveRecord {
public final fun getMember ()Lnet/mamoe/mirai/contact/NormalMember;
public final fun getMemberId ()J
public final fun getMemberName ()Ljava/lang/String;
public final fun getMessagesCount ()I
public final fun getPeriodDays ()I
}
public abstract interface class net/mamoe/mirai/contact/active/GroupActive {
public abstract fun asFlow ()Lkotlinx/coroutines/flow/Flow;
public abstract fun asStream ()Ljava/util/stream/Stream;
public abstract fun getRankTitles ()Ljava/util/Map;
public abstract fun getTemperatureTitles ()Ljava/util/Map;
public abstract fun isHonorVisible ()Z
public abstract fun isTemperatureVisible ()Z
public abstract fun isTitleVisible ()Z
public fun queryActiveRank ()Ljava/util/List;
public abstract fun queryActiveRank (Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public fun queryChart ()Lnet/mamoe/mirai/contact/active/ActiveChart;
public abstract fun queryChart (Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public abstract fun queryHonorHistory (ILkotlin/coroutines/Continuation;)Ljava/lang/Object;
public fun refresh ()V
public abstract fun refresh (Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public fun setHonorVisible (Z)V
public abstract fun setHonorVisible (ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
public fun setRankTitles (Ljava/util/Map;)V
public abstract fun setRankTitles (Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public fun setTemperatureTitles (Ljava/util/Map;)V
public abstract fun setTemperatureTitles (Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public fun setTemperatureVisible (Z)V
public abstract fun setTemperatureVisible (ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
public fun setTitleVisible (Z)V
public abstract fun setTitleVisible (ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
}
public abstract interface class net/mamoe/mirai/contact/active/MemberActive {
public abstract fun getHonors ()Ljava/util/Set;
public abstract fun getPoint ()I
public abstract fun getRank ()I
public abstract fun getTemperature ()I
public fun queryMedal ()Lnet/mamoe/mirai/contact/active/MemberMedalInfo;
public abstract fun queryMedal (Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
}
public final class net/mamoe/mirai/contact/active/MemberMedalInfo {
public final fun getColor ()Ljava/lang/String;
public final fun getMedals ()Ljava/util/Set;
public final fun getTitle ()Ljava/lang/String;
public final fun getWearing ()Lnet/mamoe/mirai/contact/active/MemberMedalType;
}
public final class net/mamoe/mirai/contact/active/MemberMedalType : java/lang/Enum {
public static final field ACTIVE Lnet/mamoe/mirai/contact/active/MemberMedalType;
public static final field ADMIN Lnet/mamoe/mirai/contact/active/MemberMedalType;
public static final field OWNER Lnet/mamoe/mirai/contact/active/MemberMedalType;
public static final field SPECIAL Lnet/mamoe/mirai/contact/active/MemberMedalType;
public final fun getMask ()I
public static fun valueOf (Ljava/lang/String;)Lnet/mamoe/mirai/contact/active/MemberMedalType;
public static fun values ()[Lnet/mamoe/mirai/contact/active/MemberMedalType;
}
public abstract interface class net/mamoe/mirai/contact/announcement/Announcement {
public static final field Companion Lnet/mamoe/mirai/contact/announcement/Announcement$Companion;
public abstract fun getContent ()Ljava/lang/String;
@ -1003,534 +1098,67 @@ public class net/mamoe/mirai/data/FriendInfoImpl : net/mamoe/mirai/data/FriendIn
public fun setRemark (Ljava/lang/String;)V
}
public final class net/mamoe/mirai/data/GroupActiveData$$serializer : kotlinx/serialization/internal/GeneratedSerializer {
public static final field INSTANCE Lnet/mamoe/mirai/data/GroupActiveData$$serializer;
public static final synthetic field descriptor Lkotlinx/serialization/descriptors/SerialDescriptor;
public fun childSerializers ()[Lkotlinx/serialization/KSerializer;
public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object;
public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lnet/mamoe/mirai/data/GroupActiveData;
public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor;
public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V
public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lnet/mamoe/mirai/data/GroupActiveData;)V
public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer;
}
public final class net/mamoe/mirai/data/GroupActiveData$Companion {
public final fun serializer ()Lkotlinx/serialization/KSerializer;
}
public final class net/mamoe/mirai/data/GroupActiveData$GInfo {
public static final field Companion Lnet/mamoe/mirai/data/GroupActiveData$GInfo$Companion;
public fun <init> ()V
public synthetic fun <init> (ILjava/util/List;Ljava/lang/Integer;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V
public fun <init> (Ljava/util/List;Ljava/lang/Integer;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;)V
public synthetic fun <init> (Ljava/util/List;Ljava/lang/Integer;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()Ljava/util/List;
public final fun component10 ()Ljava/lang/String;
public final fun component11 ()Ljava/lang/Integer;
public final fun component2 ()Ljava/lang/Integer;
public final fun component3 ()Ljava/util/List;
public final fun component4 ()Ljava/util/List;
public final fun component5 ()Ljava/util/List;
public final fun component6 ()Ljava/util/List;
public final fun component7 ()Ljava/util/List;
public final fun component8 ()Ljava/lang/Integer;
public final fun component9 ()Ljava/lang/String;
public final fun copy (Ljava/util/List;Ljava/lang/Integer;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;)Lnet/mamoe/mirai/data/GroupActiveData$GInfo;
public static synthetic fun copy$default (Lnet/mamoe/mirai/data/GroupActiveData$GInfo;Ljava/util/List;Ljava/lang/Integer;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;ILjava/lang/Object;)Lnet/mamoe/mirai/data/GroupActiveData$GInfo;
public final class net/mamoe/mirai/data/GroupHonorType {
public static final field BRONZE_ID I
public static final field Companion Lnet/mamoe/mirai/data/GroupHonorType$Companion;
public static final field EMOTION_ID I
public static final field GOLDEN_ID I
public static final field LEGEND_ID I
public static final field PERFORMER_ID I
public static final field RED_PACKET_ID I
public static final field RICHER_ID I
public static final field SILVER_ID I
public static final field STRONG_NEWBIE_ID I
public static final field TALKATIVE_ID I
public static final field WHIRLWIND_ID I
public static final synthetic fun box-impl (I)Lnet/mamoe/mirai/data/GroupHonorType;
public static fun constructor-impl (I)I
public fun equals (Ljava/lang/Object;)Z
public final fun getActNum ()Ljava/util/List;
public final fun getCreateTime ()Ljava/lang/Integer;
public final fun getExitNum ()Ljava/util/List;
public final fun getGc ()Ljava/lang/Integer;
public final fun getGn ()Ljava/lang/String;
public final fun getGowner ()Ljava/lang/String;
public final fun getJoinNum ()Ljava/util/List;
public final fun getMemNum ()Ljava/util/List;
public final fun getMostAct ()Ljava/util/List;
public final fun getSentences ()Ljava/util/List;
public static fun equals-impl (ILjava/lang/Object;)Z
public static final fun equals-impl0 (II)Z
public static final fun getBRONZE-AVr_HNQ ()I
public static final fun getEMOTION-AVr_HNQ ()I
public static final fun getGOLDEN-AVr_HNQ ()I
public final fun getId ()I
public static final fun getLEGEND-AVr_HNQ ()I
public static final fun getPERFORMER-AVr_HNQ ()I
public static final fun getRED_PACKET-AVr_HNQ ()I
public static final fun getRICHER-AVr_HNQ ()I
public static final fun getSILVER-AVr_HNQ ()I
public static final fun getSTRONG_NEWBIE-AVr_HNQ ()I
public static final fun getTALKATIVE-AVr_HNQ ()I
public static final fun getWHIRLWIND-AVr_HNQ ()I
public fun hashCode ()I
public final fun isEnd ()Ljava/lang/Integer;
public static fun hashCode-impl (I)I
public fun toString ()Ljava/lang/String;
public static final fun write$Self (Lnet/mamoe/mirai/data/GroupActiveData$GInfo;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V
public static fun toString-impl (I)Ljava/lang/String;
public final synthetic fun unbox-impl ()I
}
public final class net/mamoe/mirai/data/GroupActiveData$GInfo$$serializer : kotlinx/serialization/internal/GeneratedSerializer {
public static final field INSTANCE Lnet/mamoe/mirai/data/GroupActiveData$GInfo$$serializer;
public final class net/mamoe/mirai/data/GroupHonorType$$serializer : kotlinx/serialization/internal/GeneratedSerializer {
public static final field INSTANCE Lnet/mamoe/mirai/data/GroupHonorType$$serializer;
public static final synthetic field descriptor Lkotlinx/serialization/descriptors/SerialDescriptor;
public fun childSerializers ()[Lkotlinx/serialization/KSerializer;
public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object;
public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lnet/mamoe/mirai/data/GroupActiveData$GInfo;
public fun deserialize-NYH6FXw (Lkotlinx/serialization/encoding/Decoder;)I
public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor;
public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V
public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lnet/mamoe/mirai/data/GroupActiveData$GInfo;)V
public fun serialize-aLnpm_Q (Lkotlinx/serialization/encoding/Encoder;I)V
public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer;
}
public final class net/mamoe/mirai/data/GroupActiveData$GInfo$Companion {
public final fun serializer ()Lkotlinx/serialization/KSerializer;
}
public final class net/mamoe/mirai/data/GroupActiveData$GInfo$GActNum {
public static final field Companion Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GActNum$Companion;
public fun <init> ()V
public synthetic fun <init> (ILjava/lang/String;Ljava/lang/Integer;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V
public fun <init> (Ljava/lang/String;Ljava/lang/Integer;)V
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()Ljava/lang/String;
public final fun component2 ()Ljava/lang/Integer;
public final fun copy (Ljava/lang/String;Ljava/lang/Integer;)Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GActNum;
public static synthetic fun copy$default (Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GActNum;Ljava/lang/String;Ljava/lang/Integer;ILjava/lang/Object;)Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GActNum;
public fun equals (Ljava/lang/Object;)Z
public final fun getDate ()Ljava/lang/String;
public final fun getNum ()Ljava/lang/Integer;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
public static final fun write$Self (Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GActNum;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V
}
public final class net/mamoe/mirai/data/GroupActiveData$GInfo$GActNum$$serializer : kotlinx/serialization/internal/GeneratedSerializer {
public static final field INSTANCE Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GActNum$$serializer;
public static final synthetic field descriptor Lkotlinx/serialization/descriptors/SerialDescriptor;
public fun childSerializers ()[Lkotlinx/serialization/KSerializer;
public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object;
public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GActNum;
public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor;
public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V
public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GActNum;)V
public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer;
}
public final class net/mamoe/mirai/data/GroupActiveData$GInfo$GActNum$Companion {
public final fun serializer ()Lkotlinx/serialization/KSerializer;
}
public final class net/mamoe/mirai/data/GroupActiveData$GInfo$GExitNum {
public static final field Companion Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GExitNum$Companion;
public fun <init> ()V
public synthetic fun <init> (ILjava/lang/String;Ljava/lang/Integer;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V
public fun <init> (Ljava/lang/String;Ljava/lang/Integer;)V
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()Ljava/lang/String;
public final fun component2 ()Ljava/lang/Integer;
public final fun copy (Ljava/lang/String;Ljava/lang/Integer;)Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GExitNum;
public static synthetic fun copy$default (Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GExitNum;Ljava/lang/String;Ljava/lang/Integer;ILjava/lang/Object;)Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GExitNum;
public fun equals (Ljava/lang/Object;)Z
public final fun getDate ()Ljava/lang/String;
public final fun getNum ()Ljava/lang/Integer;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
public static final fun write$Self (Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GExitNum;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V
}
public final class net/mamoe/mirai/data/GroupActiveData$GInfo$GExitNum$$serializer : kotlinx/serialization/internal/GeneratedSerializer {
public static final field INSTANCE Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GExitNum$$serializer;
public static final synthetic field descriptor Lkotlinx/serialization/descriptors/SerialDescriptor;
public fun childSerializers ()[Lkotlinx/serialization/KSerializer;
public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object;
public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GExitNum;
public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor;
public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V
public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GExitNum;)V
public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer;
}
public final class net/mamoe/mirai/data/GroupActiveData$GInfo$GExitNum$Companion {
public final fun serializer ()Lkotlinx/serialization/KSerializer;
}
public final class net/mamoe/mirai/data/GroupActiveData$GInfo$GJoinNum {
public static final field Companion Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GJoinNum$Companion;
public fun <init> ()V
public synthetic fun <init> (ILjava/lang/String;Ljava/lang/Integer;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V
public fun <init> (Ljava/lang/String;Ljava/lang/Integer;)V
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()Ljava/lang/String;
public final fun component2 ()Ljava/lang/Integer;
public final fun copy (Ljava/lang/String;Ljava/lang/Integer;)Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GJoinNum;
public static synthetic fun copy$default (Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GJoinNum;Ljava/lang/String;Ljava/lang/Integer;ILjava/lang/Object;)Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GJoinNum;
public fun equals (Ljava/lang/Object;)Z
public final fun getDate ()Ljava/lang/String;
public final fun getNum ()Ljava/lang/Integer;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
public static final fun write$Self (Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GJoinNum;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V
}
public final class net/mamoe/mirai/data/GroupActiveData$GInfo$GJoinNum$$serializer : kotlinx/serialization/internal/GeneratedSerializer {
public static final field INSTANCE Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GJoinNum$$serializer;
public static final synthetic field descriptor Lkotlinx/serialization/descriptors/SerialDescriptor;
public fun childSerializers ()[Lkotlinx/serialization/KSerializer;
public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object;
public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GJoinNum;
public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor;
public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V
public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GJoinNum;)V
public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer;
}
public final class net/mamoe/mirai/data/GroupActiveData$GInfo$GJoinNum$Companion {
public final fun serializer ()Lkotlinx/serialization/KSerializer;
}
public final class net/mamoe/mirai/data/GroupActiveData$GInfo$GMemNum {
public static final field Companion Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GMemNum$Companion;
public fun <init> ()V
public synthetic fun <init> (ILjava/lang/String;Ljava/lang/Integer;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V
public fun <init> (Ljava/lang/String;Ljava/lang/Integer;)V
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()Ljava/lang/String;
public final fun component2 ()Ljava/lang/Integer;
public final fun copy (Ljava/lang/String;Ljava/lang/Integer;)Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GMemNum;
public static synthetic fun copy$default (Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GMemNum;Ljava/lang/String;Ljava/lang/Integer;ILjava/lang/Object;)Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GMemNum;
public fun equals (Ljava/lang/Object;)Z
public final fun getDate ()Ljava/lang/String;
public final fun getNum ()Ljava/lang/Integer;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
public static final fun write$Self (Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GMemNum;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V
}
public final class net/mamoe/mirai/data/GroupActiveData$GInfo$GMemNum$$serializer : kotlinx/serialization/internal/GeneratedSerializer {
public static final field INSTANCE Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GMemNum$$serializer;
public static final synthetic field descriptor Lkotlinx/serialization/descriptors/SerialDescriptor;
public fun childSerializers ()[Lkotlinx/serialization/KSerializer;
public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object;
public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GMemNum;
public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor;
public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V
public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GMemNum;)V
public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer;
}
public final class net/mamoe/mirai/data/GroupActiveData$GInfo$GMemNum$Companion {
public final fun serializer ()Lkotlinx/serialization/KSerializer;
}
public final class net/mamoe/mirai/data/GroupActiveData$GInfo$GMostAct {
public static final field Companion Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GMostAct$Companion;
public fun <init> ()V
public synthetic fun <init> (ILjava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Long;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V
public fun <init> (Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Long;)V
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Long;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()Ljava/lang/String;
public final fun component2 ()Ljava/lang/Integer;
public final fun component3 ()Ljava/lang/Integer;
public final fun component4 ()Ljava/lang/Long;
public final fun copy (Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Long;)Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GMostAct;
public static synthetic fun copy$default (Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GMostAct;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Long;ILjava/lang/Object;)Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GMostAct;
public fun equals (Ljava/lang/Object;)Z
public final fun getName ()Ljava/lang/String;
public final fun getSentencesNum ()Ljava/lang/Integer;
public final fun getSta ()Ljava/lang/Integer;
public final fun getUin ()Ljava/lang/Long;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
public static final fun write$Self (Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GMostAct;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V
}
public final class net/mamoe/mirai/data/GroupActiveData$GInfo$GMostAct$$serializer : kotlinx/serialization/internal/GeneratedSerializer {
public static final field INSTANCE Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GMostAct$$serializer;
public static final synthetic field descriptor Lkotlinx/serialization/descriptors/SerialDescriptor;
public fun childSerializers ()[Lkotlinx/serialization/KSerializer;
public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object;
public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GMostAct;
public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor;
public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V
public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GMostAct;)V
public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer;
}
public final class net/mamoe/mirai/data/GroupActiveData$GInfo$GMostAct$Companion {
public final fun serializer ()Lkotlinx/serialization/KSerializer;
}
public final class net/mamoe/mirai/data/GroupActiveData$GInfo$GSentence {
public static final field Companion Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GSentence$Companion;
public fun <init> ()V
public synthetic fun <init> (ILjava/lang/String;Ljava/lang/Integer;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V
public fun <init> (Ljava/lang/String;Ljava/lang/Integer;)V
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()Ljava/lang/String;
public final fun component2 ()Ljava/lang/Integer;
public final fun copy (Ljava/lang/String;Ljava/lang/Integer;)Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GSentence;
public static synthetic fun copy$default (Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GSentence;Ljava/lang/String;Ljava/lang/Integer;ILjava/lang/Object;)Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GSentence;
public fun equals (Ljava/lang/Object;)Z
public final fun getDate ()Ljava/lang/String;
public final fun getNum ()Ljava/lang/Integer;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
public static final fun write$Self (Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GSentence;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V
}
public final class net/mamoe/mirai/data/GroupActiveData$GInfo$GSentence$$serializer : kotlinx/serialization/internal/GeneratedSerializer {
public static final field INSTANCE Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GSentence$$serializer;
public static final synthetic field descriptor Lkotlinx/serialization/descriptors/SerialDescriptor;
public fun childSerializers ()[Lkotlinx/serialization/KSerializer;
public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object;
public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GSentence;
public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor;
public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V
public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GSentence;)V
public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer;
}
public final class net/mamoe/mirai/data/GroupActiveData$GInfo$GSentence$Companion {
public final fun serializer ()Lkotlinx/serialization/KSerializer;
}
public final class net/mamoe/mirai/data/GroupHonorListData$$serializer : kotlinx/serialization/internal/GeneratedSerializer {
public static final field INSTANCE Lnet/mamoe/mirai/data/GroupHonorListData$$serializer;
public static final synthetic field descriptor Lkotlinx/serialization/descriptors/SerialDescriptor;
public fun childSerializers ()[Lkotlinx/serialization/KSerializer;
public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object;
public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lnet/mamoe/mirai/data/GroupHonorListData;
public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor;
public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V
public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lnet/mamoe/mirai/data/GroupHonorListData;)V
public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer;
}
public final class net/mamoe/mirai/data/GroupHonorListData$Actor {
public static final field Companion Lnet/mamoe/mirai/data/GroupHonorListData$Actor$Companion;
public synthetic fun <init> (ILjava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V
public fun <init> (Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;)V
public synthetic fun <init> (Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()Ljava/lang/Long;
public final fun component2 ()Ljava/lang/String;
public final fun component3 ()Ljava/lang/String;
public final fun component4 ()Ljava/lang/String;
public final fun component5 ()Ljava/lang/String;
public final fun component6 ()Ljava/lang/String;
public final fun component7 ()Ljava/lang/Integer;
public final fun copy (Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;)Lnet/mamoe/mirai/data/GroupHonorListData$Actor;
public static synthetic fun copy$default (Lnet/mamoe/mirai/data/GroupHonorListData$Actor;Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;ILjava/lang/Object;)Lnet/mamoe/mirai/data/GroupHonorListData$Actor;
public fun equals (Ljava/lang/Object;)Z
public final fun getAvatar ()Ljava/lang/String;
public final fun getBtnText ()Ljava/lang/String;
public final fun getDesc ()Ljava/lang/String;
public final fun getIcon ()Ljava/lang/Integer;
public final fun getName ()Ljava/lang/String;
public final fun getText ()Ljava/lang/String;
public final fun getUin ()Ljava/lang/Long;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
public static final fun write$Self (Lnet/mamoe/mirai/data/GroupHonorListData$Actor;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V
}
public final class net/mamoe/mirai/data/GroupHonorListData$Actor$$serializer : kotlinx/serialization/internal/GeneratedSerializer {
public static final field INSTANCE Lnet/mamoe/mirai/data/GroupHonorListData$Actor$$serializer;
public static final synthetic field descriptor Lkotlinx/serialization/descriptors/SerialDescriptor;
public fun childSerializers ()[Lkotlinx/serialization/KSerializer;
public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object;
public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lnet/mamoe/mirai/data/GroupHonorListData$Actor;
public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor;
public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V
public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lnet/mamoe/mirai/data/GroupHonorListData$Actor;)V
public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer;
}
public final class net/mamoe/mirai/data/GroupHonorListData$Actor$Companion {
public final fun serializer ()Lkotlinx/serialization/KSerializer;
}
public final class net/mamoe/mirai/data/GroupHonorListData$Companion {
public final fun serializer ()Lkotlinx/serialization/KSerializer;
}
public final class net/mamoe/mirai/data/GroupHonorListData$CurrentTalkative {
public static final field Companion Lnet/mamoe/mirai/data/GroupHonorListData$CurrentTalkative$Companion;
public fun <init> ()V
public synthetic fun <init> (ILjava/lang/Long;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/String;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V
public fun <init> (Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/String;)V
public synthetic fun <init> (Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()Ljava/lang/Long;
public final fun component2 ()Ljava/lang/Integer;
public final fun component3 ()Ljava/lang/String;
public final fun component4 ()Ljava/lang/Integer;
public final fun component5 ()Ljava/lang/String;
public final fun copy (Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/String;)Lnet/mamoe/mirai/data/GroupHonorListData$CurrentTalkative;
public static synthetic fun copy$default (Lnet/mamoe/mirai/data/GroupHonorListData$CurrentTalkative;Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/String;ILjava/lang/Object;)Lnet/mamoe/mirai/data/GroupHonorListData$CurrentTalkative;
public fun equals (Ljava/lang/Object;)Z
public final fun getAvatar ()Ljava/lang/String;
public final fun getAvatarSize ()Ljava/lang/Integer;
public final fun getDayCount ()Ljava/lang/Integer;
public final fun getNick ()Ljava/lang/String;
public final fun getUin ()Ljava/lang/Long;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
public static final fun write$Self (Lnet/mamoe/mirai/data/GroupHonorListData$CurrentTalkative;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V
}
public final class net/mamoe/mirai/data/GroupHonorListData$CurrentTalkative$$serializer : kotlinx/serialization/internal/GeneratedSerializer {
public static final field INSTANCE Lnet/mamoe/mirai/data/GroupHonorListData$CurrentTalkative$$serializer;
public static final synthetic field descriptor Lkotlinx/serialization/descriptors/SerialDescriptor;
public fun childSerializers ()[Lkotlinx/serialization/KSerializer;
public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object;
public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lnet/mamoe/mirai/data/GroupHonorListData$CurrentTalkative;
public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor;
public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V
public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lnet/mamoe/mirai/data/GroupHonorListData$CurrentTalkative;)V
public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer;
}
public final class net/mamoe/mirai/data/GroupHonorListData$CurrentTalkative$Companion {
public final fun serializer ()Lkotlinx/serialization/KSerializer;
}
public final class net/mamoe/mirai/data/GroupHonorListData$GroupHonorTypeSerializer : kotlinx/serialization/KSerializer {
public static final field INSTANCE Lnet/mamoe/mirai/data/GroupHonorListData$GroupHonorTypeSerializer;
public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object;
public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lnet/mamoe/mirai/data/GroupHonorType;
public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor;
public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V
public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lnet/mamoe/mirai/data/GroupHonorType;)V
}
public final class net/mamoe/mirai/data/GroupHonorListData$Language {
public fun <init> ()V
public fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Double;)V
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Double;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()Ljava/lang/String;
public final fun component2 ()Ljava/lang/String;
public final fun component3 ()Ljava/lang/String;
public final fun component4 ()Ljava/lang/Double;
public final fun copy (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Double;)Lnet/mamoe/mirai/data/GroupHonorListData$Language;
public static synthetic fun copy$default (Lnet/mamoe/mirai/data/GroupHonorListData$Language;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Double;ILjava/lang/Object;)Lnet/mamoe/mirai/data/GroupHonorListData$Language;
public fun equals (Ljava/lang/Object;)Z
public final fun getCode ()Ljava/lang/String;
public final fun getQuality ()Ljava/lang/Double;
public final fun getRegion ()Ljava/lang/String;
public final fun getScript ()Ljava/lang/String;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}
public final class net/mamoe/mirai/data/GroupHonorListData$LevelName {
public static final field Companion Lnet/mamoe/mirai/data/GroupHonorListData$LevelName$Companion;
public fun <init> ()V
public synthetic fun <init> (ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V
public fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()Ljava/lang/String;
public final fun component2 ()Ljava/lang/String;
public final fun component3 ()Ljava/lang/String;
public final fun component4 ()Ljava/lang/String;
public final fun component5 ()Ljava/lang/String;
public final fun component6 ()Ljava/lang/String;
public final fun copy (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lnet/mamoe/mirai/data/GroupHonorListData$LevelName;
public static synthetic fun copy$default (Lnet/mamoe/mirai/data/GroupHonorListData$LevelName;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Lnet/mamoe/mirai/data/GroupHonorListData$LevelName;
public fun equals (Ljava/lang/Object;)Z
public final fun getLv1 ()Ljava/lang/String;
public final fun getLv2 ()Ljava/lang/String;
public final fun getLv3 ()Ljava/lang/String;
public final fun getLv4 ()Ljava/lang/String;
public final fun getLv5 ()Ljava/lang/String;
public final fun getLv6 ()Ljava/lang/String;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
public static final fun write$Self (Lnet/mamoe/mirai/data/GroupHonorListData$LevelName;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V
}
public final class net/mamoe/mirai/data/GroupHonorListData$LevelName$$serializer : kotlinx/serialization/internal/GeneratedSerializer {
public static final field INSTANCE Lnet/mamoe/mirai/data/GroupHonorListData$LevelName$$serializer;
public static final synthetic field descriptor Lkotlinx/serialization/descriptors/SerialDescriptor;
public fun childSerializers ()[Lkotlinx/serialization/KSerializer;
public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object;
public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lnet/mamoe/mirai/data/GroupHonorListData$LevelName;
public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor;
public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V
public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lnet/mamoe/mirai/data/GroupHonorListData$LevelName;)V
public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer;
}
public final class net/mamoe/mirai/data/GroupHonorListData$LevelName$Companion {
public final fun serializer ()Lkotlinx/serialization/KSerializer;
}
public final class net/mamoe/mirai/data/GroupHonorListData$Tag {
public static final field Companion Lnet/mamoe/mirai/data/GroupHonorListData$Tag$Companion;
public fun <init> ()V
public synthetic fun <init> (ILjava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V
public fun <init> (Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
public synthetic fun <init> (Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()Ljava/lang/Long;
public final fun component2 ()Ljava/lang/String;
public final fun component3 ()Ljava/lang/String;
public final fun component4 ()Ljava/lang/String;
public final fun component5 ()Ljava/lang/String;
public final fun component6 ()Ljava/lang/String;
public final fun component7 ()Ljava/lang/String;
public final fun copy (Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lnet/mamoe/mirai/data/GroupHonorListData$Tag;
public static synthetic fun copy$default (Lnet/mamoe/mirai/data/GroupHonorListData$Tag;Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Lnet/mamoe/mirai/data/GroupHonorListData$Tag;
public fun equals (Ljava/lang/Object;)Z
public final fun getAvatar ()Ljava/lang/String;
public final fun getBtnText ()Ljava/lang/String;
public final fun getName ()Ljava/lang/String;
public final fun getTag ()Ljava/lang/String;
public final fun getTagColor ()Ljava/lang/String;
public final fun getText ()Ljava/lang/String;
public final fun getUin ()Ljava/lang/Long;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
public static final fun write$Self (Lnet/mamoe/mirai/data/GroupHonorListData$Tag;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V
}
public final class net/mamoe/mirai/data/GroupHonorListData$Tag$$serializer : kotlinx/serialization/internal/GeneratedSerializer {
public static final field INSTANCE Lnet/mamoe/mirai/data/GroupHonorListData$Tag$$serializer;
public static final synthetic field descriptor Lkotlinx/serialization/descriptors/SerialDescriptor;
public fun childSerializers ()[Lkotlinx/serialization/KSerializer;
public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object;
public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lnet/mamoe/mirai/data/GroupHonorListData$Tag;
public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor;
public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V
public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lnet/mamoe/mirai/data/GroupHonorListData$Tag;)V
public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer;
}
public final class net/mamoe/mirai/data/GroupHonorListData$Tag$Companion {
public final fun serializer ()Lkotlinx/serialization/KSerializer;
}
public final class net/mamoe/mirai/data/GroupHonorListData$Talkative {
public static final field Companion Lnet/mamoe/mirai/data/GroupHonorListData$Talkative$Companion;
public fun <init> ()V
public synthetic fun <init> (ILjava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V
public fun <init> (Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
public synthetic fun <init> (Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()Ljava/lang/Long;
public final fun component2 ()Ljava/lang/String;
public final fun component3 ()Ljava/lang/String;
public final fun component4 ()Ljava/lang/String;
public final fun component5 ()Ljava/lang/String;
public final fun component6 ()Ljava/lang/String;
public final fun copy (Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lnet/mamoe/mirai/data/GroupHonorListData$Talkative;
public static synthetic fun copy$default (Lnet/mamoe/mirai/data/GroupHonorListData$Talkative;Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Lnet/mamoe/mirai/data/GroupHonorListData$Talkative;
public fun equals (Ljava/lang/Object;)Z
public final fun getAvatar ()Ljava/lang/String;
public final fun getBtnText ()Ljava/lang/String;
public final fun getDesc ()Ljava/lang/String;
public final fun getName ()Ljava/lang/String;
public final fun getText ()Ljava/lang/String;
public final fun getUin ()Ljava/lang/Long;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
public static final fun write$Self (Lnet/mamoe/mirai/data/GroupHonorListData$Talkative;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V
}
public final class net/mamoe/mirai/data/GroupHonorListData$Talkative$$serializer : kotlinx/serialization/internal/GeneratedSerializer {
public static final field INSTANCE Lnet/mamoe/mirai/data/GroupHonorListData$Talkative$$serializer;
public static final synthetic field descriptor Lkotlinx/serialization/descriptors/SerialDescriptor;
public fun childSerializers ()[Lkotlinx/serialization/KSerializer;
public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object;
public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lnet/mamoe/mirai/data/GroupHonorListData$Talkative;
public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor;
public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V
public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lnet/mamoe/mirai/data/GroupHonorListData$Talkative;)V
public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer;
}
public final class net/mamoe/mirai/data/GroupHonorListData$Talkative$Companion {
public final class net/mamoe/mirai/data/GroupHonorType$Companion {
public final fun getBRONZE-AVr_HNQ ()I
public final fun getEMOTION-AVr_HNQ ()I
public final fun getGOLDEN-AVr_HNQ ()I
public final fun getLEGEND-AVr_HNQ ()I
public final fun getPERFORMER-AVr_HNQ ()I
public final fun getRED_PACKET-AVr_HNQ ()I
public final fun getRICHER-AVr_HNQ ()I
public final fun getSILVER-AVr_HNQ ()I
public final fun getSTRONG_NEWBIE-AVr_HNQ ()I
public final fun getTALKATIVE-AVr_HNQ ()I
public final fun getWHIRLWIND-AVr_HNQ ()I
public final fun serializer ()Lkotlinx/serialization/KSerializer;
}
@ -1545,17 +1173,26 @@ public abstract interface class net/mamoe/mirai/data/GroupInfo {
public abstract fun getMuteAll ()Z
public abstract fun getName ()Ljava/lang/String;
public abstract fun getOwner ()J
public abstract fun getRankTitles ()Ljava/util/Map;
public abstract fun getTemperatureTitles ()Ljava/util/Map;
public abstract fun getUin ()J
public abstract fun isHonorVisible ()Z
public abstract fun isTemperatureVisible ()Z
public abstract fun isTitleVisible ()Z
}
public abstract interface class net/mamoe/mirai/data/MemberInfo : net/mamoe/mirai/data/UserInfo {
public fun getAnonymousId ()Ljava/lang/String;
public abstract fun getHonors ()Ljava/util/Set;
public abstract fun getJoinTimestamp ()I
public abstract fun getLastSpeakTimestamp ()I
public abstract fun getMuteTimestamp ()I
public abstract fun getNameCard ()Ljava/lang/String;
public abstract fun getPermission ()Lnet/mamoe/mirai/contact/MemberPermission;
public abstract fun getPoint ()I
public abstract fun getRank ()I
public abstract fun getSpecialTitle ()Ljava/lang/String;
public abstract fun getTemperature ()I
public abstract fun isOfficialBot ()Z
}
@ -2807,13 +2444,13 @@ public final class net/mamoe/mirai/event/events/MemberCardChangeEvent : net/mamo
}
public final class net/mamoe/mirai/event/events/MemberHonorChangeEvent$Achieve : net/mamoe/mirai/event/events/MemberHonorChangeEvent {
public fun <init> (Lnet/mamoe/mirai/contact/NormalMember;Lnet/mamoe/mirai/data/GroupHonorType;)V
public synthetic fun <init> (Lnet/mamoe/mirai/contact/NormalMember;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()Lnet/mamoe/mirai/contact/NormalMember;
public final fun component2 ()Lnet/mamoe/mirai/data/GroupHonorType;
public final fun copy (Lnet/mamoe/mirai/contact/NormalMember;Lnet/mamoe/mirai/data/GroupHonorType;)Lnet/mamoe/mirai/event/events/MemberHonorChangeEvent$Achieve;
public static synthetic fun copy$default (Lnet/mamoe/mirai/event/events/MemberHonorChangeEvent$Achieve;Lnet/mamoe/mirai/contact/NormalMember;Lnet/mamoe/mirai/data/GroupHonorType;ILjava/lang/Object;)Lnet/mamoe/mirai/event/events/MemberHonorChangeEvent$Achieve;
public final fun component2-AVr_HNQ ()I
public final fun copy-aLnpm_Q (Lnet/mamoe/mirai/contact/NormalMember;I)Lnet/mamoe/mirai/event/events/MemberHonorChangeEvent$Achieve;
public static synthetic fun copy-aLnpm_Q$default (Lnet/mamoe/mirai/event/events/MemberHonorChangeEvent$Achieve;Lnet/mamoe/mirai/contact/NormalMember;IILjava/lang/Object;)Lnet/mamoe/mirai/event/events/MemberHonorChangeEvent$Achieve;
public fun equals (Ljava/lang/Object;)Z
public fun getHonorType ()Lnet/mamoe/mirai/data/GroupHonorType;
public fun getHonorType ()I
public synthetic fun getMember ()Lnet/mamoe/mirai/contact/Member;
public fun getMember ()Lnet/mamoe/mirai/contact/NormalMember;
public fun hashCode ()I
@ -2821,13 +2458,13 @@ public final class net/mamoe/mirai/event/events/MemberHonorChangeEvent$Achieve :
}
public final class net/mamoe/mirai/event/events/MemberHonorChangeEvent$Lose : net/mamoe/mirai/event/events/MemberHonorChangeEvent {
public fun <init> (Lnet/mamoe/mirai/contact/NormalMember;Lnet/mamoe/mirai/data/GroupHonorType;)V
public synthetic fun <init> (Lnet/mamoe/mirai/contact/NormalMember;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()Lnet/mamoe/mirai/contact/NormalMember;
public final fun component2 ()Lnet/mamoe/mirai/data/GroupHonorType;
public final fun copy (Lnet/mamoe/mirai/contact/NormalMember;Lnet/mamoe/mirai/data/GroupHonorType;)Lnet/mamoe/mirai/event/events/MemberHonorChangeEvent$Lose;
public static synthetic fun copy$default (Lnet/mamoe/mirai/event/events/MemberHonorChangeEvent$Lose;Lnet/mamoe/mirai/contact/NormalMember;Lnet/mamoe/mirai/data/GroupHonorType;ILjava/lang/Object;)Lnet/mamoe/mirai/event/events/MemberHonorChangeEvent$Lose;
public final fun component2-AVr_HNQ ()I
public final fun copy-aLnpm_Q (Lnet/mamoe/mirai/contact/NormalMember;I)Lnet/mamoe/mirai/event/events/MemberHonorChangeEvent$Lose;
public static synthetic fun copy-aLnpm_Q$default (Lnet/mamoe/mirai/event/events/MemberHonorChangeEvent$Lose;Lnet/mamoe/mirai/contact/NormalMember;IILjava/lang/Object;)Lnet/mamoe/mirai/event/events/MemberHonorChangeEvent$Lose;
public fun equals (Ljava/lang/Object;)Z
public fun getHonorType ()Lnet/mamoe/mirai/data/GroupHonorType;
public fun getHonorType ()I
public synthetic fun getMember ()Lnet/mamoe/mirai/contact/Member;
public fun getMember ()Lnet/mamoe/mirai/contact/NormalMember;
public fun hashCode ()I

View File

@ -130,8 +130,6 @@ public abstract interface class net/mamoe/mirai/IMirai : net/mamoe/mirai/LowLeve
public abstract interface class net/mamoe/mirai/LowLevelApiAccessor {
public fun getGroupVoiceDownloadUrl (Lnet/mamoe/mirai/Bot;[BJJ)Ljava/lang/String;
public abstract fun getGroupVoiceDownloadUrl (Lnet/mamoe/mirai/Bot;[BJJLkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun getRawGroupActiveData$default (Lnet/mamoe/mirai/LowLevelApiAccessor;Lnet/mamoe/mirai/Bot;JIILjava/lang/Object;)Lnet/mamoe/mirai/data/GroupActiveData;
public static synthetic fun getRawGroupActiveData$default (Lnet/mamoe/mirai/LowLevelApiAccessor;Lnet/mamoe/mirai/Bot;JILkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public fun getRawGroupList (Lnet/mamoe/mirai/Bot;)Lkotlin/sequences/Sequence;
public abstract fun getRawGroupList (Lnet/mamoe/mirai/Bot;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public fun getRawGroupMemberList (Lnet/mamoe/mirai/Bot;JJJ)Lkotlin/sequences/Sequence;
@ -374,6 +372,7 @@ public abstract interface class net/mamoe/mirai/contact/Group : kotlinx/coroutin
public abstract fun contains (J)Z
public fun contains (Lnet/mamoe/mirai/contact/NormalMember;)Z
public abstract fun get (J)Lnet/mamoe/mirai/contact/NormalMember;
public abstract fun getActive ()Lnet/mamoe/mirai/contact/active/GroupActive;
public abstract fun getAnnouncements ()Lnet/mamoe/mirai/contact/announcement/Announcements;
public fun getAvatarUrl ()Ljava/lang/String;
public synthetic fun getAvatarUrl (Lnet/mamoe/mirai/contact/AvatarSpec;)Ljava/lang/String;
@ -426,10 +425,13 @@ public abstract interface class net/mamoe/mirai/contact/GroupSettings {
}
public abstract interface class net/mamoe/mirai/contact/Member : net/mamoe/mirai/contact/User {
public abstract fun getActive ()Lnet/mamoe/mirai/contact/active/MemberActive;
public abstract fun getGroup ()Lnet/mamoe/mirai/contact/Group;
public abstract fun getNameCard ()Ljava/lang/String;
public abstract fun getPermission ()Lnet/mamoe/mirai/contact/MemberPermission;
public fun getRankTitle ()Ljava/lang/String;
public abstract fun getSpecialTitle ()Ljava/lang/String;
public fun getTemperatureTitle ()Ljava/lang/String;
public fun mute (I)V
public abstract fun mute (ILkotlin/coroutines/Continuation;)Ljava/lang/Object;
public abstract fun nudge ()Lnet/mamoe/mirai/message/action/MemberNudge;
@ -618,6 +620,99 @@ public abstract interface class net/mamoe/mirai/contact/UserOrBot : net/mamoe/mi
public abstract fun nudge ()Lnet/mamoe/mirai/message/action/Nudge;
}
public final class net/mamoe/mirai/contact/active/ActiveChart {
public final fun getActives ()Ljava/util/Map;
public final fun getExit ()Ljava/util/Map;
public final fun getJoin ()Ljava/util/Map;
public final fun getMembers ()Ljava/util/Map;
public final fun getSentences ()Ljava/util/Map;
}
public final class net/mamoe/mirai/contact/active/ActiveHonorInfo {
public final fun getAvatar ()Ljava/lang/String;
public final fun getHistoryDays ()I
public final fun getMaxTermDays ()I
public final fun getMember ()Lnet/mamoe/mirai/contact/NormalMember;
public final fun getMemberId ()J
public final fun getMemberName ()Ljava/lang/String;
public final fun getTermDays ()I
}
public final class net/mamoe/mirai/contact/active/ActiveHonorList {
public final fun getCurrent ()Lnet/mamoe/mirai/contact/active/ActiveHonorInfo;
public final fun getRecords ()Ljava/util/List;
public final fun getType ()I
}
public final class net/mamoe/mirai/contact/active/ActiveRankRecord {
public final fun getMember ()Lnet/mamoe/mirai/contact/NormalMember;
public final fun getMemberId ()J
public final fun getMemberName ()Ljava/lang/String;
public final fun getScore ()I
public final fun getTemperature ()I
}
public final class net/mamoe/mirai/contact/active/ActiveRecord {
public final fun getMember ()Lnet/mamoe/mirai/contact/NormalMember;
public final fun getMemberId ()J
public final fun getMemberName ()Ljava/lang/String;
public final fun getMessagesCount ()I
public final fun getPeriodDays ()I
}
public abstract interface class net/mamoe/mirai/contact/active/GroupActive {
public abstract fun asFlow ()Lkotlinx/coroutines/flow/Flow;
public abstract fun asStream ()Ljava/util/stream/Stream;
public abstract fun getRankTitles ()Ljava/util/Map;
public abstract fun getTemperatureTitles ()Ljava/util/Map;
public abstract fun isHonorVisible ()Z
public abstract fun isTemperatureVisible ()Z
public abstract fun isTitleVisible ()Z
public fun queryActiveRank ()Ljava/util/List;
public abstract fun queryActiveRank (Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public fun queryChart ()Lnet/mamoe/mirai/contact/active/ActiveChart;
public abstract fun queryChart (Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public abstract fun queryHonorHistory (ILkotlin/coroutines/Continuation;)Ljava/lang/Object;
public fun refresh ()V
public abstract fun refresh (Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public fun setHonorVisible (Z)V
public abstract fun setHonorVisible (ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
public fun setRankTitles (Ljava/util/Map;)V
public abstract fun setRankTitles (Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public fun setTemperatureTitles (Ljava/util/Map;)V
public abstract fun setTemperatureTitles (Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public fun setTemperatureVisible (Z)V
public abstract fun setTemperatureVisible (ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
public fun setTitleVisible (Z)V
public abstract fun setTitleVisible (ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
}
public abstract interface class net/mamoe/mirai/contact/active/MemberActive {
public abstract fun getHonors ()Ljava/util/Set;
public abstract fun getPoint ()I
public abstract fun getRank ()I
public abstract fun getTemperature ()I
public fun queryMedal ()Lnet/mamoe/mirai/contact/active/MemberMedalInfo;
public abstract fun queryMedal (Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
}
public final class net/mamoe/mirai/contact/active/MemberMedalInfo {
public final fun getColor ()Ljava/lang/String;
public final fun getMedals ()Ljava/util/Set;
public final fun getTitle ()Ljava/lang/String;
public final fun getWearing ()Lnet/mamoe/mirai/contact/active/MemberMedalType;
}
public final class net/mamoe/mirai/contact/active/MemberMedalType : java/lang/Enum {
public static final field ACTIVE Lnet/mamoe/mirai/contact/active/MemberMedalType;
public static final field ADMIN Lnet/mamoe/mirai/contact/active/MemberMedalType;
public static final field OWNER Lnet/mamoe/mirai/contact/active/MemberMedalType;
public static final field SPECIAL Lnet/mamoe/mirai/contact/active/MemberMedalType;
public final fun getMask ()I
public static fun valueOf (Ljava/lang/String;)Lnet/mamoe/mirai/contact/active/MemberMedalType;
public static fun values ()[Lnet/mamoe/mirai/contact/active/MemberMedalType;
}
public abstract interface class net/mamoe/mirai/contact/announcement/Announcement {
public static final field Companion Lnet/mamoe/mirai/contact/announcement/Announcement$Companion;
public abstract fun getContent ()Ljava/lang/String;
@ -1003,534 +1098,67 @@ public class net/mamoe/mirai/data/FriendInfoImpl : net/mamoe/mirai/data/FriendIn
public fun setRemark (Ljava/lang/String;)V
}
public final class net/mamoe/mirai/data/GroupActiveData$$serializer : kotlinx/serialization/internal/GeneratedSerializer {
public static final field INSTANCE Lnet/mamoe/mirai/data/GroupActiveData$$serializer;
public static final synthetic field descriptor Lkotlinx/serialization/descriptors/SerialDescriptor;
public fun childSerializers ()[Lkotlinx/serialization/KSerializer;
public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object;
public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lnet/mamoe/mirai/data/GroupActiveData;
public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor;
public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V
public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lnet/mamoe/mirai/data/GroupActiveData;)V
public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer;
}
public final class net/mamoe/mirai/data/GroupActiveData$Companion {
public final fun serializer ()Lkotlinx/serialization/KSerializer;
}
public final class net/mamoe/mirai/data/GroupActiveData$GInfo {
public static final field Companion Lnet/mamoe/mirai/data/GroupActiveData$GInfo$Companion;
public fun <init> ()V
public synthetic fun <init> (ILjava/util/List;Ljava/lang/Integer;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V
public fun <init> (Ljava/util/List;Ljava/lang/Integer;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;)V
public synthetic fun <init> (Ljava/util/List;Ljava/lang/Integer;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()Ljava/util/List;
public final fun component10 ()Ljava/lang/String;
public final fun component11 ()Ljava/lang/Integer;
public final fun component2 ()Ljava/lang/Integer;
public final fun component3 ()Ljava/util/List;
public final fun component4 ()Ljava/util/List;
public final fun component5 ()Ljava/util/List;
public final fun component6 ()Ljava/util/List;
public final fun component7 ()Ljava/util/List;
public final fun component8 ()Ljava/lang/Integer;
public final fun component9 ()Ljava/lang/String;
public final fun copy (Ljava/util/List;Ljava/lang/Integer;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;)Lnet/mamoe/mirai/data/GroupActiveData$GInfo;
public static synthetic fun copy$default (Lnet/mamoe/mirai/data/GroupActiveData$GInfo;Ljava/util/List;Ljava/lang/Integer;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;ILjava/lang/Object;)Lnet/mamoe/mirai/data/GroupActiveData$GInfo;
public final class net/mamoe/mirai/data/GroupHonorType {
public static final field BRONZE_ID I
public static final field Companion Lnet/mamoe/mirai/data/GroupHonorType$Companion;
public static final field EMOTION_ID I
public static final field GOLDEN_ID I
public static final field LEGEND_ID I
public static final field PERFORMER_ID I
public static final field RED_PACKET_ID I
public static final field RICHER_ID I
public static final field SILVER_ID I
public static final field STRONG_NEWBIE_ID I
public static final field TALKATIVE_ID I
public static final field WHIRLWIND_ID I
public static final synthetic fun box-impl (I)Lnet/mamoe/mirai/data/GroupHonorType;
public static fun constructor-impl (I)I
public fun equals (Ljava/lang/Object;)Z
public final fun getActNum ()Ljava/util/List;
public final fun getCreateTime ()Ljava/lang/Integer;
public final fun getExitNum ()Ljava/util/List;
public final fun getGc ()Ljava/lang/Integer;
public final fun getGn ()Ljava/lang/String;
public final fun getGowner ()Ljava/lang/String;
public final fun getJoinNum ()Ljava/util/List;
public final fun getMemNum ()Ljava/util/List;
public final fun getMostAct ()Ljava/util/List;
public final fun getSentences ()Ljava/util/List;
public static fun equals-impl (ILjava/lang/Object;)Z
public static final fun equals-impl0 (II)Z
public static final fun getBRONZE-AVr_HNQ ()I
public static final fun getEMOTION-AVr_HNQ ()I
public static final fun getGOLDEN-AVr_HNQ ()I
public final fun getId ()I
public static final fun getLEGEND-AVr_HNQ ()I
public static final fun getPERFORMER-AVr_HNQ ()I
public static final fun getRED_PACKET-AVr_HNQ ()I
public static final fun getRICHER-AVr_HNQ ()I
public static final fun getSILVER-AVr_HNQ ()I
public static final fun getSTRONG_NEWBIE-AVr_HNQ ()I
public static final fun getTALKATIVE-AVr_HNQ ()I
public static final fun getWHIRLWIND-AVr_HNQ ()I
public fun hashCode ()I
public final fun isEnd ()Ljava/lang/Integer;
public static fun hashCode-impl (I)I
public fun toString ()Ljava/lang/String;
public static final fun write$Self (Lnet/mamoe/mirai/data/GroupActiveData$GInfo;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V
public static fun toString-impl (I)Ljava/lang/String;
public final synthetic fun unbox-impl ()I
}
public final class net/mamoe/mirai/data/GroupActiveData$GInfo$$serializer : kotlinx/serialization/internal/GeneratedSerializer {
public static final field INSTANCE Lnet/mamoe/mirai/data/GroupActiveData$GInfo$$serializer;
public final class net/mamoe/mirai/data/GroupHonorType$$serializer : kotlinx/serialization/internal/GeneratedSerializer {
public static final field INSTANCE Lnet/mamoe/mirai/data/GroupHonorType$$serializer;
public static final synthetic field descriptor Lkotlinx/serialization/descriptors/SerialDescriptor;
public fun childSerializers ()[Lkotlinx/serialization/KSerializer;
public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object;
public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lnet/mamoe/mirai/data/GroupActiveData$GInfo;
public fun deserialize-NYH6FXw (Lkotlinx/serialization/encoding/Decoder;)I
public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor;
public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V
public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lnet/mamoe/mirai/data/GroupActiveData$GInfo;)V
public fun serialize-aLnpm_Q (Lkotlinx/serialization/encoding/Encoder;I)V
public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer;
}
public final class net/mamoe/mirai/data/GroupActiveData$GInfo$Companion {
public final fun serializer ()Lkotlinx/serialization/KSerializer;
}
public final class net/mamoe/mirai/data/GroupActiveData$GInfo$GActNum {
public static final field Companion Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GActNum$Companion;
public fun <init> ()V
public synthetic fun <init> (ILjava/lang/String;Ljava/lang/Integer;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V
public fun <init> (Ljava/lang/String;Ljava/lang/Integer;)V
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()Ljava/lang/String;
public final fun component2 ()Ljava/lang/Integer;
public final fun copy (Ljava/lang/String;Ljava/lang/Integer;)Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GActNum;
public static synthetic fun copy$default (Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GActNum;Ljava/lang/String;Ljava/lang/Integer;ILjava/lang/Object;)Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GActNum;
public fun equals (Ljava/lang/Object;)Z
public final fun getDate ()Ljava/lang/String;
public final fun getNum ()Ljava/lang/Integer;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
public static final fun write$Self (Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GActNum;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V
}
public final class net/mamoe/mirai/data/GroupActiveData$GInfo$GActNum$$serializer : kotlinx/serialization/internal/GeneratedSerializer {
public static final field INSTANCE Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GActNum$$serializer;
public static final synthetic field descriptor Lkotlinx/serialization/descriptors/SerialDescriptor;
public fun childSerializers ()[Lkotlinx/serialization/KSerializer;
public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object;
public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GActNum;
public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor;
public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V
public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GActNum;)V
public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer;
}
public final class net/mamoe/mirai/data/GroupActiveData$GInfo$GActNum$Companion {
public final fun serializer ()Lkotlinx/serialization/KSerializer;
}
public final class net/mamoe/mirai/data/GroupActiveData$GInfo$GExitNum {
public static final field Companion Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GExitNum$Companion;
public fun <init> ()V
public synthetic fun <init> (ILjava/lang/String;Ljava/lang/Integer;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V
public fun <init> (Ljava/lang/String;Ljava/lang/Integer;)V
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()Ljava/lang/String;
public final fun component2 ()Ljava/lang/Integer;
public final fun copy (Ljava/lang/String;Ljava/lang/Integer;)Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GExitNum;
public static synthetic fun copy$default (Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GExitNum;Ljava/lang/String;Ljava/lang/Integer;ILjava/lang/Object;)Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GExitNum;
public fun equals (Ljava/lang/Object;)Z
public final fun getDate ()Ljava/lang/String;
public final fun getNum ()Ljava/lang/Integer;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
public static final fun write$Self (Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GExitNum;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V
}
public final class net/mamoe/mirai/data/GroupActiveData$GInfo$GExitNum$$serializer : kotlinx/serialization/internal/GeneratedSerializer {
public static final field INSTANCE Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GExitNum$$serializer;
public static final synthetic field descriptor Lkotlinx/serialization/descriptors/SerialDescriptor;
public fun childSerializers ()[Lkotlinx/serialization/KSerializer;
public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object;
public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GExitNum;
public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor;
public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V
public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GExitNum;)V
public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer;
}
public final class net/mamoe/mirai/data/GroupActiveData$GInfo$GExitNum$Companion {
public final fun serializer ()Lkotlinx/serialization/KSerializer;
}
public final class net/mamoe/mirai/data/GroupActiveData$GInfo$GJoinNum {
public static final field Companion Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GJoinNum$Companion;
public fun <init> ()V
public synthetic fun <init> (ILjava/lang/String;Ljava/lang/Integer;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V
public fun <init> (Ljava/lang/String;Ljava/lang/Integer;)V
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()Ljava/lang/String;
public final fun component2 ()Ljava/lang/Integer;
public final fun copy (Ljava/lang/String;Ljava/lang/Integer;)Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GJoinNum;
public static synthetic fun copy$default (Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GJoinNum;Ljava/lang/String;Ljava/lang/Integer;ILjava/lang/Object;)Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GJoinNum;
public fun equals (Ljava/lang/Object;)Z
public final fun getDate ()Ljava/lang/String;
public final fun getNum ()Ljava/lang/Integer;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
public static final fun write$Self (Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GJoinNum;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V
}
public final class net/mamoe/mirai/data/GroupActiveData$GInfo$GJoinNum$$serializer : kotlinx/serialization/internal/GeneratedSerializer {
public static final field INSTANCE Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GJoinNum$$serializer;
public static final synthetic field descriptor Lkotlinx/serialization/descriptors/SerialDescriptor;
public fun childSerializers ()[Lkotlinx/serialization/KSerializer;
public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object;
public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GJoinNum;
public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor;
public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V
public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GJoinNum;)V
public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer;
}
public final class net/mamoe/mirai/data/GroupActiveData$GInfo$GJoinNum$Companion {
public final fun serializer ()Lkotlinx/serialization/KSerializer;
}
public final class net/mamoe/mirai/data/GroupActiveData$GInfo$GMemNum {
public static final field Companion Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GMemNum$Companion;
public fun <init> ()V
public synthetic fun <init> (ILjava/lang/String;Ljava/lang/Integer;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V
public fun <init> (Ljava/lang/String;Ljava/lang/Integer;)V
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()Ljava/lang/String;
public final fun component2 ()Ljava/lang/Integer;
public final fun copy (Ljava/lang/String;Ljava/lang/Integer;)Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GMemNum;
public static synthetic fun copy$default (Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GMemNum;Ljava/lang/String;Ljava/lang/Integer;ILjava/lang/Object;)Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GMemNum;
public fun equals (Ljava/lang/Object;)Z
public final fun getDate ()Ljava/lang/String;
public final fun getNum ()Ljava/lang/Integer;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
public static final fun write$Self (Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GMemNum;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V
}
public final class net/mamoe/mirai/data/GroupActiveData$GInfo$GMemNum$$serializer : kotlinx/serialization/internal/GeneratedSerializer {
public static final field INSTANCE Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GMemNum$$serializer;
public static final synthetic field descriptor Lkotlinx/serialization/descriptors/SerialDescriptor;
public fun childSerializers ()[Lkotlinx/serialization/KSerializer;
public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object;
public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GMemNum;
public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor;
public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V
public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GMemNum;)V
public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer;
}
public final class net/mamoe/mirai/data/GroupActiveData$GInfo$GMemNum$Companion {
public final fun serializer ()Lkotlinx/serialization/KSerializer;
}
public final class net/mamoe/mirai/data/GroupActiveData$GInfo$GMostAct {
public static final field Companion Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GMostAct$Companion;
public fun <init> ()V
public synthetic fun <init> (ILjava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Long;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V
public fun <init> (Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Long;)V
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Long;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()Ljava/lang/String;
public final fun component2 ()Ljava/lang/Integer;
public final fun component3 ()Ljava/lang/Integer;
public final fun component4 ()Ljava/lang/Long;
public final fun copy (Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Long;)Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GMostAct;
public static synthetic fun copy$default (Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GMostAct;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Long;ILjava/lang/Object;)Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GMostAct;
public fun equals (Ljava/lang/Object;)Z
public final fun getName ()Ljava/lang/String;
public final fun getSentencesNum ()Ljava/lang/Integer;
public final fun getSta ()Ljava/lang/Integer;
public final fun getUin ()Ljava/lang/Long;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
public static final fun write$Self (Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GMostAct;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V
}
public final class net/mamoe/mirai/data/GroupActiveData$GInfo$GMostAct$$serializer : kotlinx/serialization/internal/GeneratedSerializer {
public static final field INSTANCE Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GMostAct$$serializer;
public static final synthetic field descriptor Lkotlinx/serialization/descriptors/SerialDescriptor;
public fun childSerializers ()[Lkotlinx/serialization/KSerializer;
public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object;
public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GMostAct;
public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor;
public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V
public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GMostAct;)V
public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer;
}
public final class net/mamoe/mirai/data/GroupActiveData$GInfo$GMostAct$Companion {
public final fun serializer ()Lkotlinx/serialization/KSerializer;
}
public final class net/mamoe/mirai/data/GroupActiveData$GInfo$GSentence {
public static final field Companion Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GSentence$Companion;
public fun <init> ()V
public synthetic fun <init> (ILjava/lang/String;Ljava/lang/Integer;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V
public fun <init> (Ljava/lang/String;Ljava/lang/Integer;)V
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()Ljava/lang/String;
public final fun component2 ()Ljava/lang/Integer;
public final fun copy (Ljava/lang/String;Ljava/lang/Integer;)Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GSentence;
public static synthetic fun copy$default (Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GSentence;Ljava/lang/String;Ljava/lang/Integer;ILjava/lang/Object;)Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GSentence;
public fun equals (Ljava/lang/Object;)Z
public final fun getDate ()Ljava/lang/String;
public final fun getNum ()Ljava/lang/Integer;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
public static final fun write$Self (Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GSentence;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V
}
public final class net/mamoe/mirai/data/GroupActiveData$GInfo$GSentence$$serializer : kotlinx/serialization/internal/GeneratedSerializer {
public static final field INSTANCE Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GSentence$$serializer;
public static final synthetic field descriptor Lkotlinx/serialization/descriptors/SerialDescriptor;
public fun childSerializers ()[Lkotlinx/serialization/KSerializer;
public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object;
public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GSentence;
public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor;
public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V
public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lnet/mamoe/mirai/data/GroupActiveData$GInfo$GSentence;)V
public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer;
}
public final class net/mamoe/mirai/data/GroupActiveData$GInfo$GSentence$Companion {
public final fun serializer ()Lkotlinx/serialization/KSerializer;
}
public final class net/mamoe/mirai/data/GroupHonorListData$$serializer : kotlinx/serialization/internal/GeneratedSerializer {
public static final field INSTANCE Lnet/mamoe/mirai/data/GroupHonorListData$$serializer;
public static final synthetic field descriptor Lkotlinx/serialization/descriptors/SerialDescriptor;
public fun childSerializers ()[Lkotlinx/serialization/KSerializer;
public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object;
public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lnet/mamoe/mirai/data/GroupHonorListData;
public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor;
public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V
public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lnet/mamoe/mirai/data/GroupHonorListData;)V
public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer;
}
public final class net/mamoe/mirai/data/GroupHonorListData$Actor {
public static final field Companion Lnet/mamoe/mirai/data/GroupHonorListData$Actor$Companion;
public synthetic fun <init> (ILjava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V
public fun <init> (Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;)V
public synthetic fun <init> (Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()Ljava/lang/Long;
public final fun component2 ()Ljava/lang/String;
public final fun component3 ()Ljava/lang/String;
public final fun component4 ()Ljava/lang/String;
public final fun component5 ()Ljava/lang/String;
public final fun component6 ()Ljava/lang/String;
public final fun component7 ()Ljava/lang/Integer;
public final fun copy (Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;)Lnet/mamoe/mirai/data/GroupHonorListData$Actor;
public static synthetic fun copy$default (Lnet/mamoe/mirai/data/GroupHonorListData$Actor;Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;ILjava/lang/Object;)Lnet/mamoe/mirai/data/GroupHonorListData$Actor;
public fun equals (Ljava/lang/Object;)Z
public final fun getAvatar ()Ljava/lang/String;
public final fun getBtnText ()Ljava/lang/String;
public final fun getDesc ()Ljava/lang/String;
public final fun getIcon ()Ljava/lang/Integer;
public final fun getName ()Ljava/lang/String;
public final fun getText ()Ljava/lang/String;
public final fun getUin ()Ljava/lang/Long;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
public static final fun write$Self (Lnet/mamoe/mirai/data/GroupHonorListData$Actor;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V
}
public final class net/mamoe/mirai/data/GroupHonorListData$Actor$$serializer : kotlinx/serialization/internal/GeneratedSerializer {
public static final field INSTANCE Lnet/mamoe/mirai/data/GroupHonorListData$Actor$$serializer;
public static final synthetic field descriptor Lkotlinx/serialization/descriptors/SerialDescriptor;
public fun childSerializers ()[Lkotlinx/serialization/KSerializer;
public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object;
public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lnet/mamoe/mirai/data/GroupHonorListData$Actor;
public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor;
public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V
public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lnet/mamoe/mirai/data/GroupHonorListData$Actor;)V
public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer;
}
public final class net/mamoe/mirai/data/GroupHonorListData$Actor$Companion {
public final fun serializer ()Lkotlinx/serialization/KSerializer;
}
public final class net/mamoe/mirai/data/GroupHonorListData$Companion {
public final fun serializer ()Lkotlinx/serialization/KSerializer;
}
public final class net/mamoe/mirai/data/GroupHonorListData$CurrentTalkative {
public static final field Companion Lnet/mamoe/mirai/data/GroupHonorListData$CurrentTalkative$Companion;
public fun <init> ()V
public synthetic fun <init> (ILjava/lang/Long;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/String;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V
public fun <init> (Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/String;)V
public synthetic fun <init> (Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()Ljava/lang/Long;
public final fun component2 ()Ljava/lang/Integer;
public final fun component3 ()Ljava/lang/String;
public final fun component4 ()Ljava/lang/Integer;
public final fun component5 ()Ljava/lang/String;
public final fun copy (Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/String;)Lnet/mamoe/mirai/data/GroupHonorListData$CurrentTalkative;
public static synthetic fun copy$default (Lnet/mamoe/mirai/data/GroupHonorListData$CurrentTalkative;Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/String;ILjava/lang/Object;)Lnet/mamoe/mirai/data/GroupHonorListData$CurrentTalkative;
public fun equals (Ljava/lang/Object;)Z
public final fun getAvatar ()Ljava/lang/String;
public final fun getAvatarSize ()Ljava/lang/Integer;
public final fun getDayCount ()Ljava/lang/Integer;
public final fun getNick ()Ljava/lang/String;
public final fun getUin ()Ljava/lang/Long;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
public static final fun write$Self (Lnet/mamoe/mirai/data/GroupHonorListData$CurrentTalkative;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V
}
public final class net/mamoe/mirai/data/GroupHonorListData$CurrentTalkative$$serializer : kotlinx/serialization/internal/GeneratedSerializer {
public static final field INSTANCE Lnet/mamoe/mirai/data/GroupHonorListData$CurrentTalkative$$serializer;
public static final synthetic field descriptor Lkotlinx/serialization/descriptors/SerialDescriptor;
public fun childSerializers ()[Lkotlinx/serialization/KSerializer;
public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object;
public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lnet/mamoe/mirai/data/GroupHonorListData$CurrentTalkative;
public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor;
public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V
public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lnet/mamoe/mirai/data/GroupHonorListData$CurrentTalkative;)V
public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer;
}
public final class net/mamoe/mirai/data/GroupHonorListData$CurrentTalkative$Companion {
public final fun serializer ()Lkotlinx/serialization/KSerializer;
}
public final class net/mamoe/mirai/data/GroupHonorListData$GroupHonorTypeSerializer : kotlinx/serialization/KSerializer {
public static final field INSTANCE Lnet/mamoe/mirai/data/GroupHonorListData$GroupHonorTypeSerializer;
public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object;
public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lnet/mamoe/mirai/data/GroupHonorType;
public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor;
public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V
public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lnet/mamoe/mirai/data/GroupHonorType;)V
}
public final class net/mamoe/mirai/data/GroupHonorListData$Language {
public fun <init> ()V
public fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Double;)V
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Double;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()Ljava/lang/String;
public final fun component2 ()Ljava/lang/String;
public final fun component3 ()Ljava/lang/String;
public final fun component4 ()Ljava/lang/Double;
public final fun copy (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Double;)Lnet/mamoe/mirai/data/GroupHonorListData$Language;
public static synthetic fun copy$default (Lnet/mamoe/mirai/data/GroupHonorListData$Language;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Double;ILjava/lang/Object;)Lnet/mamoe/mirai/data/GroupHonorListData$Language;
public fun equals (Ljava/lang/Object;)Z
public final fun getCode ()Ljava/lang/String;
public final fun getQuality ()Ljava/lang/Double;
public final fun getRegion ()Ljava/lang/String;
public final fun getScript ()Ljava/lang/String;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}
public final class net/mamoe/mirai/data/GroupHonorListData$LevelName {
public static final field Companion Lnet/mamoe/mirai/data/GroupHonorListData$LevelName$Companion;
public fun <init> ()V
public synthetic fun <init> (ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V
public fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()Ljava/lang/String;
public final fun component2 ()Ljava/lang/String;
public final fun component3 ()Ljava/lang/String;
public final fun component4 ()Ljava/lang/String;
public final fun component5 ()Ljava/lang/String;
public final fun component6 ()Ljava/lang/String;
public final fun copy (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lnet/mamoe/mirai/data/GroupHonorListData$LevelName;
public static synthetic fun copy$default (Lnet/mamoe/mirai/data/GroupHonorListData$LevelName;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Lnet/mamoe/mirai/data/GroupHonorListData$LevelName;
public fun equals (Ljava/lang/Object;)Z
public final fun getLv1 ()Ljava/lang/String;
public final fun getLv2 ()Ljava/lang/String;
public final fun getLv3 ()Ljava/lang/String;
public final fun getLv4 ()Ljava/lang/String;
public final fun getLv5 ()Ljava/lang/String;
public final fun getLv6 ()Ljava/lang/String;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
public static final fun write$Self (Lnet/mamoe/mirai/data/GroupHonorListData$LevelName;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V
}
public final class net/mamoe/mirai/data/GroupHonorListData$LevelName$$serializer : kotlinx/serialization/internal/GeneratedSerializer {
public static final field INSTANCE Lnet/mamoe/mirai/data/GroupHonorListData$LevelName$$serializer;
public static final synthetic field descriptor Lkotlinx/serialization/descriptors/SerialDescriptor;
public fun childSerializers ()[Lkotlinx/serialization/KSerializer;
public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object;
public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lnet/mamoe/mirai/data/GroupHonorListData$LevelName;
public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor;
public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V
public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lnet/mamoe/mirai/data/GroupHonorListData$LevelName;)V
public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer;
}
public final class net/mamoe/mirai/data/GroupHonorListData$LevelName$Companion {
public final fun serializer ()Lkotlinx/serialization/KSerializer;
}
public final class net/mamoe/mirai/data/GroupHonorListData$Tag {
public static final field Companion Lnet/mamoe/mirai/data/GroupHonorListData$Tag$Companion;
public fun <init> ()V
public synthetic fun <init> (ILjava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V
public fun <init> (Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
public synthetic fun <init> (Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()Ljava/lang/Long;
public final fun component2 ()Ljava/lang/String;
public final fun component3 ()Ljava/lang/String;
public final fun component4 ()Ljava/lang/String;
public final fun component5 ()Ljava/lang/String;
public final fun component6 ()Ljava/lang/String;
public final fun component7 ()Ljava/lang/String;
public final fun copy (Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lnet/mamoe/mirai/data/GroupHonorListData$Tag;
public static synthetic fun copy$default (Lnet/mamoe/mirai/data/GroupHonorListData$Tag;Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Lnet/mamoe/mirai/data/GroupHonorListData$Tag;
public fun equals (Ljava/lang/Object;)Z
public final fun getAvatar ()Ljava/lang/String;
public final fun getBtnText ()Ljava/lang/String;
public final fun getName ()Ljava/lang/String;
public final fun getTag ()Ljava/lang/String;
public final fun getTagColor ()Ljava/lang/String;
public final fun getText ()Ljava/lang/String;
public final fun getUin ()Ljava/lang/Long;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
public static final fun write$Self (Lnet/mamoe/mirai/data/GroupHonorListData$Tag;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V
}
public final class net/mamoe/mirai/data/GroupHonorListData$Tag$$serializer : kotlinx/serialization/internal/GeneratedSerializer {
public static final field INSTANCE Lnet/mamoe/mirai/data/GroupHonorListData$Tag$$serializer;
public static final synthetic field descriptor Lkotlinx/serialization/descriptors/SerialDescriptor;
public fun childSerializers ()[Lkotlinx/serialization/KSerializer;
public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object;
public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lnet/mamoe/mirai/data/GroupHonorListData$Tag;
public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor;
public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V
public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lnet/mamoe/mirai/data/GroupHonorListData$Tag;)V
public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer;
}
public final class net/mamoe/mirai/data/GroupHonorListData$Tag$Companion {
public final fun serializer ()Lkotlinx/serialization/KSerializer;
}
public final class net/mamoe/mirai/data/GroupHonorListData$Talkative {
public static final field Companion Lnet/mamoe/mirai/data/GroupHonorListData$Talkative$Companion;
public fun <init> ()V
public synthetic fun <init> (ILjava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V
public fun <init> (Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
public synthetic fun <init> (Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()Ljava/lang/Long;
public final fun component2 ()Ljava/lang/String;
public final fun component3 ()Ljava/lang/String;
public final fun component4 ()Ljava/lang/String;
public final fun component5 ()Ljava/lang/String;
public final fun component6 ()Ljava/lang/String;
public final fun copy (Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lnet/mamoe/mirai/data/GroupHonorListData$Talkative;
public static synthetic fun copy$default (Lnet/mamoe/mirai/data/GroupHonorListData$Talkative;Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Lnet/mamoe/mirai/data/GroupHonorListData$Talkative;
public fun equals (Ljava/lang/Object;)Z
public final fun getAvatar ()Ljava/lang/String;
public final fun getBtnText ()Ljava/lang/String;
public final fun getDesc ()Ljava/lang/String;
public final fun getName ()Ljava/lang/String;
public final fun getText ()Ljava/lang/String;
public final fun getUin ()Ljava/lang/Long;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
public static final fun write$Self (Lnet/mamoe/mirai/data/GroupHonorListData$Talkative;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V
}
public final class net/mamoe/mirai/data/GroupHonorListData$Talkative$$serializer : kotlinx/serialization/internal/GeneratedSerializer {
public static final field INSTANCE Lnet/mamoe/mirai/data/GroupHonorListData$Talkative$$serializer;
public static final synthetic field descriptor Lkotlinx/serialization/descriptors/SerialDescriptor;
public fun childSerializers ()[Lkotlinx/serialization/KSerializer;
public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object;
public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lnet/mamoe/mirai/data/GroupHonorListData$Talkative;
public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor;
public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V
public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lnet/mamoe/mirai/data/GroupHonorListData$Talkative;)V
public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer;
}
public final class net/mamoe/mirai/data/GroupHonorListData$Talkative$Companion {
public final class net/mamoe/mirai/data/GroupHonorType$Companion {
public final fun getBRONZE-AVr_HNQ ()I
public final fun getEMOTION-AVr_HNQ ()I
public final fun getGOLDEN-AVr_HNQ ()I
public final fun getLEGEND-AVr_HNQ ()I
public final fun getPERFORMER-AVr_HNQ ()I
public final fun getRED_PACKET-AVr_HNQ ()I
public final fun getRICHER-AVr_HNQ ()I
public final fun getSILVER-AVr_HNQ ()I
public final fun getSTRONG_NEWBIE-AVr_HNQ ()I
public final fun getTALKATIVE-AVr_HNQ ()I
public final fun getWHIRLWIND-AVr_HNQ ()I
public final fun serializer ()Lkotlinx/serialization/KSerializer;
}
@ -1545,17 +1173,26 @@ public abstract interface class net/mamoe/mirai/data/GroupInfo {
public abstract fun getMuteAll ()Z
public abstract fun getName ()Ljava/lang/String;
public abstract fun getOwner ()J
public abstract fun getRankTitles ()Ljava/util/Map;
public abstract fun getTemperatureTitles ()Ljava/util/Map;
public abstract fun getUin ()J
public abstract fun isHonorVisible ()Z
public abstract fun isTemperatureVisible ()Z
public abstract fun isTitleVisible ()Z
}
public abstract interface class net/mamoe/mirai/data/MemberInfo : net/mamoe/mirai/data/UserInfo {
public fun getAnonymousId ()Ljava/lang/String;
public abstract fun getHonors ()Ljava/util/Set;
public abstract fun getJoinTimestamp ()I
public abstract fun getLastSpeakTimestamp ()I
public abstract fun getMuteTimestamp ()I
public abstract fun getNameCard ()Ljava/lang/String;
public abstract fun getPermission ()Lnet/mamoe/mirai/contact/MemberPermission;
public abstract fun getPoint ()I
public abstract fun getRank ()I
public abstract fun getSpecialTitle ()Ljava/lang/String;
public abstract fun getTemperature ()I
public abstract fun isOfficialBot ()Z
}
@ -2807,13 +2444,13 @@ public final class net/mamoe/mirai/event/events/MemberCardChangeEvent : net/mamo
}
public final class net/mamoe/mirai/event/events/MemberHonorChangeEvent$Achieve : net/mamoe/mirai/event/events/MemberHonorChangeEvent {
public fun <init> (Lnet/mamoe/mirai/contact/NormalMember;Lnet/mamoe/mirai/data/GroupHonorType;)V
public synthetic fun <init> (Lnet/mamoe/mirai/contact/NormalMember;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()Lnet/mamoe/mirai/contact/NormalMember;
public final fun component2 ()Lnet/mamoe/mirai/data/GroupHonorType;
public final fun copy (Lnet/mamoe/mirai/contact/NormalMember;Lnet/mamoe/mirai/data/GroupHonorType;)Lnet/mamoe/mirai/event/events/MemberHonorChangeEvent$Achieve;
public static synthetic fun copy$default (Lnet/mamoe/mirai/event/events/MemberHonorChangeEvent$Achieve;Lnet/mamoe/mirai/contact/NormalMember;Lnet/mamoe/mirai/data/GroupHonorType;ILjava/lang/Object;)Lnet/mamoe/mirai/event/events/MemberHonorChangeEvent$Achieve;
public final fun component2-AVr_HNQ ()I
public final fun copy-aLnpm_Q (Lnet/mamoe/mirai/contact/NormalMember;I)Lnet/mamoe/mirai/event/events/MemberHonorChangeEvent$Achieve;
public static synthetic fun copy-aLnpm_Q$default (Lnet/mamoe/mirai/event/events/MemberHonorChangeEvent$Achieve;Lnet/mamoe/mirai/contact/NormalMember;IILjava/lang/Object;)Lnet/mamoe/mirai/event/events/MemberHonorChangeEvent$Achieve;
public fun equals (Ljava/lang/Object;)Z
public fun getHonorType ()Lnet/mamoe/mirai/data/GroupHonorType;
public fun getHonorType ()I
public synthetic fun getMember ()Lnet/mamoe/mirai/contact/Member;
public fun getMember ()Lnet/mamoe/mirai/contact/NormalMember;
public fun hashCode ()I
@ -2821,13 +2458,13 @@ public final class net/mamoe/mirai/event/events/MemberHonorChangeEvent$Achieve :
}
public final class net/mamoe/mirai/event/events/MemberHonorChangeEvent$Lose : net/mamoe/mirai/event/events/MemberHonorChangeEvent {
public fun <init> (Lnet/mamoe/mirai/contact/NormalMember;Lnet/mamoe/mirai/data/GroupHonorType;)V
public synthetic fun <init> (Lnet/mamoe/mirai/contact/NormalMember;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()Lnet/mamoe/mirai/contact/NormalMember;
public final fun component2 ()Lnet/mamoe/mirai/data/GroupHonorType;
public final fun copy (Lnet/mamoe/mirai/contact/NormalMember;Lnet/mamoe/mirai/data/GroupHonorType;)Lnet/mamoe/mirai/event/events/MemberHonorChangeEvent$Lose;
public static synthetic fun copy$default (Lnet/mamoe/mirai/event/events/MemberHonorChangeEvent$Lose;Lnet/mamoe/mirai/contact/NormalMember;Lnet/mamoe/mirai/data/GroupHonorType;ILjava/lang/Object;)Lnet/mamoe/mirai/event/events/MemberHonorChangeEvent$Lose;
public final fun component2-AVr_HNQ ()I
public final fun copy-aLnpm_Q (Lnet/mamoe/mirai/contact/NormalMember;I)Lnet/mamoe/mirai/event/events/MemberHonorChangeEvent$Lose;
public static synthetic fun copy-aLnpm_Q$default (Lnet/mamoe/mirai/event/events/MemberHonorChangeEvent$Lose;Lnet/mamoe/mirai/contact/NormalMember;IILjava/lang/Object;)Lnet/mamoe/mirai/event/events/MemberHonorChangeEvent$Lose;
public fun equals (Ljava/lang/Object;)Z
public fun getHonorType ()Lnet/mamoe/mirai/data/GroupHonorType;
public fun getHonorType ()I
public synthetic fun getMember ()Lnet/mamoe/mirai/contact/Member;
public fun getMember ()Lnet/mamoe/mirai/contact/NormalMember;
public fun hashCode ()I

View File

@ -130,28 +130,6 @@ public interface LowLevelApiAccessor {
): Sequence<MemberInfo>
/**
* 获取群活跃信息
* 不传page可得到趋势图
* page从0开始传入可以得到发言列表
*/
@LowLevelApi
@MiraiExperimentalApi
public suspend fun getRawGroupActiveData(bot: Bot, groupId: Long, page: Int = -1): GroupActiveData
/**
* 获取群荣誉信息
*/
@LowLevelApi
@MiraiExperimentalApi
public suspend fun getRawGroupHonorListData(
bot: Bot,
groupId: Long,
type: GroupHonorType
): GroupHonorListData?
/**
* 处理一个账号请求添加机器人为好友的事件
*/

View File

@ -15,6 +15,7 @@ package net.mamoe.mirai.contact
import kotlinx.coroutines.CoroutineScope
import me.him188.kotlin.jvm.blocking.bridge.JvmBlockingBridge
import net.mamoe.mirai.Bot
import net.mamoe.mirai.contact.active.GroupActive
import net.mamoe.mirai.contact.announcement.Announcements
import net.mamoe.mirai.event.events.*
import net.mamoe.mirai.message.MessageReceipt
@ -133,6 +134,13 @@ public interface Group : Contact, CoroutineScope, FileSupported, AudioSupported
*/
public val announcements: Announcements
/**
* 获取群荣誉相关功能接口
* @since 2.13
*/
public val active: GroupActive
/**
* 获取群成员实例. 不存在时返回 `null`.
*

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.
@ -14,6 +14,7 @@ package net.mamoe.mirai.contact
import me.him188.kotlin.jvm.blocking.bridge.JvmBlockingBridge
import net.mamoe.mirai.Bot
import net.mamoe.mirai.contact.active.MemberActive
import net.mamoe.mirai.event.events.*
import net.mamoe.mirai.message.MessageReceipt
import net.mamoe.mirai.message.action.MemberNudge
@ -65,6 +66,40 @@ public interface Member : User {
*/
public val specialTitle: String
/**
* 群等级头衔 (PC 端显示)
* @see active
* @since 2.13
*/
public val rankTitle: String get() = group.active.rankTitles[active.rank].orEmpty()
/**
* 群活跃头衔 (手机端显示)
* @see active
* @since 2.13
*/
public val temperatureTitle: String
get() {
val level = when (active.temperature) {
in 1..10 -> 1
in 11..20 -> 2
in 21..40 -> 3
in 41..60 -> 4
in 61..80 -> 5
in 81..100 -> 6
else -> 0
}
return group.active.temperatureTitles[level].orEmpty()
}
/**
* 群活跃度相关属性.
* @see [rankTitle]
* @see [temperatureTitle]
* @since 2.13
*/
public val active: MemberActive
/**
* 禁言这个群成员 [durationSeconds] , 在机器人无权限操作时抛出 [PermissionDeniedException].
*

View File

@ -0,0 +1,29 @@
/*
* 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.
*
* https://github.com/mamoe/mirai/blob/dev/LICENSE
*/
package net.mamoe.mirai.contact.active
import net.mamoe.mirai.utils.MiraiInternalApi
/**
* 活跃度数据图表 键是 `yyyy-MM` 格式的日期值是数量
* @property members 每日总人数
* @property actives 每日活跃人数
* @property sentences 每日申请人数
* @property join 每日入群人数
* @property exit 每日退群人数
* @since 2.13
*/
public class ActiveChart @MiraiInternalApi public constructor(
public val actives: Map<String, Int>,
public val sentences: Map<String, Int>,
public val members: Map<String, Int>,
public val join: Map<String, Int>,
public val exit: Map<String, Int>
)

View File

@ -0,0 +1,33 @@
/*
* 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.
*
* https://github.com/mamoe/mirai/blob/dev/LICENSE
*/
package net.mamoe.mirai.contact.active
import net.mamoe.mirai.contact.NormalMember
/**
* 群荣耀当前持有者
* @property memberName 群员昵称
* @property memberId 群员 ID
* @property avatar 群员头像
* @property member 群员实例
* @property termDays 当前蝉联天数
* @property historyDays 历史获得天数
* @property maxTermDays 最大蝉联天数
* @since 2.13
*/
public class ActiveHonorInfo internal constructor(
public val memberName: String,
public val memberId: Long,
public val avatar: String,
public val member: NormalMember?,
public val termDays: Int,
public val historyDays: Int,
public val maxTermDays: Int,
)

View File

@ -0,0 +1,28 @@
/*
* 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.
*
* https://github.com/mamoe/mirai/blob/dev/LICENSE
*/
package net.mamoe.mirai.contact.active
import net.mamoe.mirai.data.GroupHonorType
import net.mamoe.mirai.utils.MiraiInternalApi
import kotlin.jvm.JvmName
/**
* 群荣耀历史数据
* @property type 群荣誉类型
* @property current 当前荣耀持有者 (龙王壕礼皇冠, 善财福禄寿)
* @property records 群荣耀历史记录
* @since 2.13
*/
public class ActiveHonorList @MiraiInternalApi public constructor(
@get:JvmName("getType")
public val type: GroupHonorType, // `public int getType()` for Java
public val current: ActiveHonorInfo?,
public val records: List<ActiveHonorInfo>
)

View File

@ -0,0 +1,29 @@
/*
* 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.
*
* https://github.com/mamoe/mirai/blob/dev/LICENSE
*/
package net.mamoe.mirai.contact.active
import net.mamoe.mirai.contact.NormalMember
/**
* 活跃排行榜记录
* @property memberName 发言者名称
* @property memberId 发言者 ID
* @property member 发言者的群员实例
* @property temperature 活跃度
* @property score 活跃积分
* @since 2.13
*/
public class ActiveRankRecord internal constructor(
public val memberName: String,
public val memberId: Long,
public val member: NormalMember?,
public val temperature: Int,
public val score: Int
)

View File

@ -0,0 +1,29 @@
/*
* 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.
*
* https://github.com/mamoe/mirai/blob/dev/LICENSE
*/
package net.mamoe.mirai.contact.active
import net.mamoe.mirai.contact.NormalMember
/**
* 活跃数据记录
* @property memberName 发言者名称
* @property memberId 发言者 ID
* @property member 发言者的群员实例
* @property periodDays 活跃连续天数
* @property messagesCount 发言条数
* @since 2.13
*/
public class ActiveRecord internal constructor(
public val memberName: String,
public val memberId: Long,
public val member: NormalMember?,
public val periodDays: Int,
public val messagesCount: Int
)

View File

@ -0,0 +1,160 @@
/*
* 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.
*
* https://github.com/mamoe/mirai/blob/dev/LICENSE
*/
@file:JvmBlockingBridge
package net.mamoe.mirai.contact.active
import kotlinx.coroutines.flow.Flow
import me.him188.kotlin.jvm.blocking.bridge.JvmBlockingBridge
import net.mamoe.mirai.contact.Group
import net.mamoe.mirai.contact.Member
import net.mamoe.mirai.data.GroupHonorType
import net.mamoe.mirai.utils.NotStableForInheritance
import kotlin.jvm.JvmName
/**
* 表示一个群活跃度管理.
*
* ## 获取 [GroupActive] 实例
*
* 只可以通过 [Group.active] 获取一个群的活跃度管理, [GroupActive] 实例.
*
* ### 头衔设置
*
* * 通过 [isHonorVisible] 可以获取和设置一个群的荣誉是否显示,
* * 通过 [isTitleVisible] 可以获取和设置一个群的头衔是否显示,
* * 通过 [isTemperatureVisible] 可以获取和设置一个群的活跃度是否显示,
* * 通过 [rankTitles] 可以获取和设置一个群的等级头衔列表 (PC 端显示),
* * 通过 [temperatureTitles] 可以获取和设置一个群的活跃度头衔列表 (手机端显示)
*
* ### 刷新群成员活跃数据
*
* 通过 [refresh] 可以刷新 [Member.active] 中的属性 (不包括 honors temperature)
*
* ### 活跃度记录
*
* 通过 [asFlow] 可以获取群活跃度记录*惰性*.
*
* 若要获取全部活跃度记录, 可使用 [toList].
*
* ### 活跃度图表
*
* 通过 [queryChart] 可以获取活跃度图表
* 包括
* * 每日总人数 [ActiveChart.members]
* * 每日活跃人数 [ActiveChart.actives]
* * 每日申请人数 [ActiveChart.sentences]
* * 每日入群人数 [ActiveChart.join]
* * 每日退群人数 [ActiveChart.exit]
*
* 通过 [queryHonorHistory] 可以获取群荣耀历史数据
* 包括
* * 当前荣耀持有者 (龙王壕礼皇冠, 善财福禄寿) [ActiveHonorList.current]
* * 群荣耀历史记录 [ActiveHonorList.records]
*
* @since 2.13
*/
@NotStableForInheritance
public expect interface GroupActive {
/**
* 是否在群聊中显示荣誉
* @see MemberActive.honors
*/
public val isHonorVisible: Boolean
/**
* 设置是否在群聊中显示荣誉
* @see MemberActive.honors
*/
public suspend fun setHonorVisible(newValue: Boolean)
/**
* 是否在群聊中显示头衔
* @see Member.rankTitle
* @see Member.temperatureTitle
*/
public val isTitleVisible: Boolean
/**
* 设置是否在群聊中显示头衔操作成功时会同时刷新等级头衔信息
* @see Member.rankTitle
* @see Member.temperatureTitle
*/
public suspend fun setTitleVisible(newValue: Boolean)
/**
* 是否在群聊中显示活跃度
* @see MemberActive.temperature
*/
public val isTemperatureVisible: Boolean
/**
* 设置是否在群聊中显示活跃度操作成功时会同时刷新等级头衔信息
* @see MemberActive.temperature
*/
public suspend fun setTemperatureVisible(newValue: Boolean)
/**
* 等级头衔列表键是等级值是头衔
*
* @see Member.rankTitle
*/
public val rankTitles: Map<Int, String>
/**
* 设置等级头衔列表键是等级值是头衔操作成功时会同时刷新等级头衔信息
* @see Member.rankTitle
*/
public suspend fun setRankTitles(newValue: Map<Int, String>)
/**
* 活跃度头衔列表键是等级值是头衔操作成功时会同时刷新活跃度头衔信息
* @see Member.temperatureTitle
*/
public val temperatureTitles: Map<Int, String>
/**
* 设置活跃度头衔列表键是等级值是头衔操作成功时会同时刷新活跃度头衔信息
* @see Member.temperatureTitle
*/
public suspend fun setTemperatureTitles(newValue: Map<Int, String>)
/**
* 刷新 [Member.active] 中的属性 (不包括 [honors][MemberActive.honors] [temperature][MemberActive.temperature])
* @see Member.active
*/
public suspend fun refresh()
/**
* 创建一个能获取该群内所有群活跃度记录的 [Flow]. [Flow] 被使用时才会分页下载 [ActiveRecord].
*
* 异常不会抛出, 只会记录到网络日志. 当获取发生异常时将会终止获取, 不影响已经成功获取的 [ActiveRecord] [Flow] [收集][Flow.collect].
*/
public fun asFlow(): Flow<ActiveRecord>
/**
* 获取活跃度图表数据
*/
public suspend fun queryChart(): ActiveChart
/**
* 获取群荣耀历史数据, 刷新 [Member.active] 中的 [MemberActive.honors]
* @see Member.active
*/
@Suppress("INAPPLICABLE_JVM_NAME")
@JvmName("queryHonorHistory")
public suspend fun queryHonorHistory(type: GroupHonorType): ActiveHonorList
/**
* 获取活跃度排行榜通常是前五十名
*/
public suspend fun queryActiveRank(): List<ActiveRankRecord>
}

View File

@ -0,0 +1,59 @@
/*
* 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.
*
* https://github.com/mamoe/mirai/blob/dev/LICENSE
*/
@file:JvmBlockingBridge
package net.mamoe.mirai.contact.active
import me.him188.kotlin.jvm.blocking.bridge.JvmBlockingBridge
import net.mamoe.mirai.data.GroupHonorType
import net.mamoe.mirai.utils.NotStableForInheritance
/**
* 群活跃度相关属性
* @since 2.13
*/
@NotStableForInheritance
public interface MemberActive {
/**
* 群活跃等级. 取值为 1~6 (包含)
*
* 这个等级是在 PC 端成员管理功能中显示的等级
*
* @see point
*/
public val rank: Int
/**
* 群活跃积分.
*
* 这个积分是在 PC 端成员管理功能中显示的积分和手机端显示的 群荣誉活跃积分 不同
*
* @see rank
*/
public val point: Int
/**
* 群荣誉标识.
*/
public val honors: Set<GroupHonorType>
/**
* 群荣誉等级. 取值为 1~100 (包含)
*
* 这个等级是在手机端群荣誉功能中显示的等级
*/
public val temperature: Int
/**
* 查询头衔佩戴情况
*/
public suspend fun queryMedal(): MemberMedalInfo
}

View File

@ -0,0 +1,28 @@
/*
* 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.
*
* https://github.com/mamoe/mirai/blob/dev/LICENSE
*/
package net.mamoe.mirai.contact.active
import net.mamoe.mirai.utils.MiraiInternalApi
/**
* 群成员头衔详情
* @property title 当前佩戴的头衔
* @property color 当前佩戴的头衔的颜色
* @property wearing 当前佩戴的头衔类型
* @property medals 拥有的所有头衔
* @since 2.13
*/
public class MemberMedalInfo @MiraiInternalApi public constructor(
public val title: String,
public val color: String,
public val wearing: MemberMedalType,
public val medals: Set<MemberMedalType>,
)

View File

@ -0,0 +1,29 @@
/*
* 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.
*
* https://github.com/mamoe/mirai/blob/dev/LICENSE
*/
package net.mamoe.mirai.contact.active
import net.mamoe.mirai.contact.active.MemberMedalType.*
import net.mamoe.mirai.utils.MiraiInternalApi
/**
* 群成员头衔详情Detail
* @property OWNER 群主独有的头衔
* @property ADMIN 管理员独有的头衔
* @property SPECIAL 群主授予的头衔
* @property ACTIVE 群主设定的头衔, 保持活跃即可获得
* @since 2.13
*/
public enum class MemberMedalType(@MiraiInternalApi public val mask: Int) {
OWNER(300),
ADMIN(301),
SPECIAL(302),
ACTIVE(315);
}

View File

@ -1,143 +0,0 @@
/*
* Copyright 2019-2021 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.
*
* https://github.com/mamoe/mirai/blob/dev/LICENSE
*/
package net.mamoe.mirai.data
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
import net.mamoe.mirai.utils.MiraiExperimentalApi
/**
* 群统计信息
*/
@MiraiExperimentalApi
@Serializable
public data class GroupActiveData(
@SerialName("ec")
val ec: Int? = null,
@SerialName("em")
val msg: String?,
@SerialName("errcode")
val errCode: Int?,
@SerialName("ginfo")
val info: GInfo? = null,
@SerialName("role")
val role: Int? = 0
) {
@Serializable
public data class GInfo(
@SerialName("g_act_num")
val actNum: List<GActNum?>? = null, //发言人数列表
@SerialName("g_createtime")
val createTime: Int? = 0,
@SerialName("g_exit_num")
val exitNum: List<GExitNum?>? = null, //退群人数列表
@SerialName("g_join_num")
val joinNum: List<GJoinNum?>? = null,
@SerialName("g_mem_num")
val memNum: List<GMemNum?>? = null, //人数变化
@SerialName("g_most_act")
val mostAct: List<GMostAct?>? = null, //发言排行
@SerialName("g_sentences")
val sentences: List<GSentence?>? = null,
@SerialName("gc")
val gc: Int? = null,
@SerialName("gn")
val gn: String? = null,
@SerialName("gowner")
val gowner: String? = null,
@SerialName("isEnd")
val isEnd: Int? = null
) {
@Serializable
public data class GActNum(
@SerialName("date")
val date: String? = null,
@SerialName("num")
val num: Int? = 0
)
@Serializable
public data class GExitNum(
@SerialName("date")
val date: String? = null,
@SerialName("num")
val num: Int? = 0
)
@Serializable
public data class GJoinNum(
@SerialName("date")
val date: String? = null,
@SerialName("num")
val num: Int? = 0
)
@Serializable
public data class GMemNum(
@SerialName("date")
val date: String? = null,
@SerialName("num")
val num: Int? = 0
)
@Serializable
public data class GMostAct(
@SerialName("name")
val name: String? = null, // 名称 不完整
@SerialName("sentences_num")
val sentencesNum: Int? = 0, // 发言数
@SerialName("sta")
val sta: Int? = 0,
@SerialName("uin")
val uin: Long? = 0
)
@Serializable
public data class GSentence(
@SerialName("date")
val date: String? = null,
@SerialName("num")
val num: Int? = 0
)
}
}

View File

@ -1,258 +0,0 @@
/*
* 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.
*
* https://github.com/mamoe/mirai/blob/dev/LICENSE
*/
package net.mamoe.mirai.data
import kotlinx.serialization.KSerializer
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
import kotlinx.serialization.descriptors.PrimitiveKind
import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor
import kotlinx.serialization.descriptors.SerialDescriptor
import kotlinx.serialization.encoding.Decoder
import kotlinx.serialization.encoding.Encoder
import net.mamoe.mirai.utils.DeprecatedSinceMirai
import net.mamoe.mirai.utils.MiraiExperimentalApi
import kotlin.jvm.JvmStatic
/**
* 群荣誉信息
*/
@MiraiExperimentalApi
public enum class GroupHonorType(public val value: Int) {
TALKATIVE(1), // 龙王
PERFORMER(2), // 群聊之火
LEGEND(3), // 群聊炽焰
STRONG_NEWBIE(5), // 冒尖小春笋
EMOTION(6), // 快乐源泉
ACTIVE(7), // 活跃头衔
EXCLUSIVE(8), // 特殊头衔
MANAGE(9); // 管理头衔
internal companion object {
@JvmStatic
internal fun deserializeFromInt(value: Int): GroupHonorType = values().first { it.value == value }
}
}
@MiraiExperimentalApi
@Serializable
public data class GroupHonorListData(
@SerialName("gc")
val gc: String?,
@Serializable(with = GroupHonorTypeSerializer::class)
@SerialName("type")
val type: GroupHonorType?,
@SerialName("uin")
val uin: String?,
@SerialName("talkativeList")
val talkativeList: List<Talkative?>? = null,
@SerialName("currentTalkative")
val currentTalkative: CurrentTalkative? = null,
@SerialName("actorList")
val actorList: List<Actor?>? = null,
@SerialName("legendList")
val legendList: List<Actor?>? = null,
@SerialName("newbieList")
val newbieList: List<Actor?>? = null,
@SerialName("strongnewbieList")
val strongNewbieList: List<Actor?>? = null,
@SerialName("emotionList")
val emotionList: List<Actor?>? = null,
@SerialName("levelname")
val levelName: LevelName? = null,
@SerialName("manageList")
val manageList: List<Tag?>? = null,
@SerialName("exclusiveList")
val exclusiveList: List<Tag?>? = null,
@SerialName("activeObj")
val activeObj: Map<String, List<Tag?>?>? = null, // Key为活跃等级名, 如`冒泡`
@SerialName("showActiveObj")
val showActiveObj: Map<String, Boolean?>? = null,
@SerialName("myTitle")
val myTitle: String?,
@SerialName("myIndex")
val myIndex: Int? = 0,
@SerialName("myAvatar")
val myAvatar: String?,
@SerialName("hasServerError")
val hasServerError: Boolean?,
@SerialName("hwExcellentList")
val hwExcellentList: List<Actor?>? = null
) {
@Deprecated(
message = "Meaningless response",
level = DeprecationLevel.HIDDEN,
replaceWith = ReplaceWith("error(\"Delete me\")"),
)
@DeprecatedSinceMirai(errorSince = "2.7", hiddenSince = "2.10") // maybe 2.7
@Suppress("DEPRECATION_ERROR")
val acceptLanguages: List<Language?>? get() = null
@Deprecated(
message = "Meaningless response",
level = DeprecationLevel.HIDDEN,
)
@DeprecatedSinceMirai(errorSince = "2.7", hiddenSince = "2.10") // maybe 2.7
public data class Language(
@SerialName("code")
val code: String? = null,
@SerialName("script")
val script: String? = null,
@SerialName("region")
val region: String? = null,
@SerialName("quality")
val quality: Double? = null
)
@Serializable
public data class Actor(
@SerialName("uin")
val uin: Long? = 0,
@SerialName("avatar")
val avatar: String? = null,
@SerialName("name")
val name: String? = null,
@SerialName("desc")
val desc: String? = null,
@SerialName("btnText")
val btnText: String? = null,
@SerialName("text")
val text: String? = null,
@SerialName("icon")
val icon: Int?
)
@Serializable
public data class Talkative(
@SerialName("uin")
val uin: Long? = 0,
@SerialName("avatar")
val avatar: String? = null,
@SerialName("name")
val name: String? = null,
@SerialName("desc")
val desc: String? = null,
@SerialName("btnText")
val btnText: String? = null,
@SerialName("text")
val text: String? = null
)
@Serializable
public data class CurrentTalkative(
@SerialName("uin")
val uin: Long? = 0,
@SerialName("day_count")
val dayCount: Int? = null,
@SerialName("avatar")
val avatar: String? = null,
@SerialName("avatar_size")
val avatarSize: Int? = null,
@SerialName("nick")
val nick: String? = null
)
@Serializable
public data class LevelName(
@SerialName("lvln1")
val lv1: String? = null,
@SerialName("lvln2")
val lv2: String? = null,
@SerialName("lvln3")
val lv3: String? = null,
@SerialName("lvln4")
val lv4: String? = null,
@SerialName("lvln5")
val lv5: String? = null,
@SerialName("lvln6")
val lv6: String? = null
)
@Serializable
public data class Tag(
@SerialName("uin")
val uin: Long? = 0,
@SerialName("avatar")
val avatar: String? = null,
@SerialName("name")
val name: String? = null,
@SerialName("btnText")
val btnText: String? = null,
@SerialName("text")
val text: String? = null,
@SerialName("tag")
val tag: String? = null, // 头衔
@SerialName("tagColor")
val tagColor: String? = null
)
public object GroupHonorTypeSerializer : KSerializer<GroupHonorType> {
override val descriptor: SerialDescriptor =
PrimitiveSerialDescriptor("GroupHonorTypeSerializer", PrimitiveKind.INT)
override fun serialize(encoder: Encoder, value: GroupHonorType) {
encoder.encodeInt(value.value)
}
override fun deserialize(decoder: Decoder): GroupHonorType {
return GroupHonorType.deserializeFromInt(decoder.decodeInt())
}
}
}

View File

@ -0,0 +1,190 @@
/*
* 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.
*
* https://github.com/mamoe/mirai/blob/dev/LICENSE
*/
@file:Suppress("MemberVisibilityCanBePrivate")
package net.mamoe.mirai.data
import kotlinx.serialization.Serializable
import net.mamoe.mirai.contact.active.GroupActive
import net.mamoe.mirai.contact.active.MemberActive
import net.mamoe.mirai.data.GroupHonorType.Companion.BRONZE
import net.mamoe.mirai.data.GroupHonorType.Companion.EMOTION
import net.mamoe.mirai.data.GroupHonorType.Companion.GOLDEN
import net.mamoe.mirai.data.GroupHonorType.Companion.LEGEND
import net.mamoe.mirai.data.GroupHonorType.Companion.PERFORMER
import net.mamoe.mirai.data.GroupHonorType.Companion.RED_PACKET
import net.mamoe.mirai.data.GroupHonorType.Companion.RICHER
import net.mamoe.mirai.data.GroupHonorType.Companion.SILVER
import net.mamoe.mirai.data.GroupHonorType.Companion.STRONG_NEWBIE
import net.mamoe.mirai.data.GroupHonorType.Companion.TALKATIVE
import net.mamoe.mirai.data.GroupHonorType.Companion.WHIRLWIND
import net.mamoe.mirai.event.events.MemberHonorChangeEvent
import kotlin.jvm.JvmInline
import kotlin.jvm.JvmStatic
/**
* 群荣誉信息
* @property TALKATIVE 龙王
* @property PERFORMER 群聊之火
* @property LEGEND 群聊炽焰
* @property STRONG_NEWBIE 冒尖小春笋
* @property EMOTION 快乐源泉
* @property BRONZE 学术新星
* @property SILVER 顶尖学霸
* @property GOLDEN 至尊学神
* @property WHIRLWIND 一笔当先
* @property RICHER 壕礼皇冠
* @property RED_PACKET 善财福禄寿
* @see GroupActive
* @see MemberActive
* @see MemberHonorChangeEvent
*/
@JvmInline
@Serializable
public value class GroupHonorType public constructor(public val id: Int) { // public for potential usages from Java. little compatibility burden.
public companion object {
// ID fields
/**
* 龙王
* @see TALKATIVE
*/
public const val TALKATIVE_ID: Int = 1
/**
* 群聊之火
* @see PERFORMER
*/
public const val PERFORMER_ID: Int = 2
/**
* 群聊炽焰
* @see LEGEND
*/
public const val LEGEND_ID: Int = 3
/**
* 冒尖小春笋
* @see STRONG_NEWBIE
*/
public const val STRONG_NEWBIE_ID: Int = 4
/**
* 快乐源泉
* @see EMOTION
*/
public const val EMOTION_ID: Int = 5
/**
* 学术新星
* @see BRONZE
*/
public const val BRONZE_ID: Int = 6
/**
* 顶尖学霸
* @see SILVER
*/
public const val SILVER_ID: Int = 7
/**
* 至尊学神
* @see GOLDEN
*/
public const val GOLDEN_ID: Int = 8
/**
* 一笔当先
* @see WHIRLWIND
*/
public const val WHIRLWIND_ID: Int = 9
/**
* 壕礼皇冠
* @see RICHER
*/
public const val RICHER_ID: Int = 10
/**
* 善财福禄寿
* @see RED_PACKET
*/
public const val RED_PACKET_ID: Int = 11
// Inline class 'instance's, invisible from Java.
/**
* 龙王
*/
@JvmStatic
public val TALKATIVE: GroupHonorType = GroupHonorType(TALKATIVE_ID)
/**
* 群聊之火
*/
@JvmStatic
public val PERFORMER: GroupHonorType = GroupHonorType(PERFORMER_ID)
/**
* 群聊炽焰
*/
@JvmStatic
public val LEGEND: GroupHonorType = GroupHonorType(LEGEND_ID)
/**
* 冒尖小春笋
*/
@JvmStatic
public val STRONG_NEWBIE: GroupHonorType = GroupHonorType(STRONG_NEWBIE_ID)
/**
* 快乐源泉
*/
@JvmStatic
public val EMOTION: GroupHonorType = GroupHonorType(EMOTION_ID)
/**
* 学术新星
*/
@JvmStatic
public val BRONZE: GroupHonorType = GroupHonorType(BRONZE_ID)
/**
* 顶尖学霸
*/
@JvmStatic
public val SILVER: GroupHonorType = GroupHonorType(SILVER_ID)
/**
* 至尊学神
*/
@JvmStatic
public val GOLDEN: GroupHonorType = GroupHonorType(GOLDEN_ID)
/**
* 一笔当先
*/
@JvmStatic
public val WHIRLWIND: GroupHonorType = GroupHonorType(WHIRLWIND_ID)
/**
* 壕礼皇冠
*/
@JvmStatic
public val RICHER: GroupHonorType = GroupHonorType(RICHER_ID)
/**
* 善财福禄寿
*/
@JvmStatic
public val RED_PACKET: GroupHonorType = GroupHonorType(RED_PACKET_ID)
}
}

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.
@ -71,14 +71,33 @@ public interface GroupInfo {
*/
public val botMuteTimestamp: Int
/*
/**
* 机器人的特殊头衔
* 荣誉是否显示
* @since 2.13
*/
val botSpecialTitle: String
public val isHonorVisible: Boolean
/**
* 机器人的昵称
* 头衔是否显示
* @since 2.13
*/
val botNameCard: String*/
public val isTitleVisible: Boolean
/**
* 活跃度是否显示
* @since 2.13
*/
public val isTemperatureVisible: Boolean
/**
* 等级头衔
* @since 2.13
*/
public val rankTitles: Map<Int, String>
/**
* 活跃度头衔
* @since 2.13
*/
public val temperatureTitles: Map<Int, String>
}

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.data
@ -38,4 +38,30 @@ public interface MemberInfo : UserInfo {
* 是否为官方机器人
*/
public val isOfficialBot: Boolean
/**
* 活跃等级
* @see point
* @since 2.13
*/
public val rank: Int
/**
* 活跃积分
* @see rank
* @since 2.13
*/
public val point: Int
/**
* 群荣誉标志
* @since 2.13
*/
public val honors: Set<GroupHonorType>
/**
* 活跃度
* @since 2.13
*/
public val temperature: Int
}

View File

@ -584,14 +584,18 @@ public sealed class MemberHonorChangeEvent : GroupMemberEvent, BotPassiveEvent,
/**
* 改变的荣誉类型
*/
public abstract val honorType: GroupHonorType
@Suppress("INAPPLICABLE_JVM_NAME")
@get:JvmName("getHonorType")
public abstract val honorType: GroupHonorType // `public int getHonorType()` on Java's point of view
/**
* 获得荣誉时的事件
*/
public data class Achieve(override val member: NormalMember, override val honorType: GroupHonorType) :
MemberHonorChangeEvent() {
public data class Achieve(
override val member: NormalMember,
@get:JvmName("getHonorType")
override val honorType: GroupHonorType
) : MemberHonorChangeEvent() {
override fun toString(): String {
return "MemberHonorChangeEvent.Achieve(member=$member, honorType=$honorType)"
}
@ -600,9 +604,11 @@ public sealed class MemberHonorChangeEvent : GroupMemberEvent, BotPassiveEvent,
/**
* 失去荣誉时的事件
*/
public data class Lose(override val member: NormalMember, override val honorType: GroupHonorType) :
MemberHonorChangeEvent() {
public data class Lose(
override val member: NormalMember,
@get:JvmName("getHonorType")
override val honorType: GroupHonorType
) : MemberHonorChangeEvent() {
override fun toString(): String {
return "MemberHonorChangeEvent.Lose(member=$member, honorType=$honorType)"
}

View File

@ -0,0 +1,172 @@
/*
* 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.
*
* https://github.com/mamoe/mirai/blob/dev/LICENSE
*/
@file:JvmBlockingBridge
package net.mamoe.mirai.contact.active
import kotlinx.coroutines.flow.Flow
import me.him188.kotlin.jvm.blocking.bridge.JvmBlockingBridge
import net.mamoe.mirai.contact.Group
import net.mamoe.mirai.contact.Member
import net.mamoe.mirai.data.GroupHonorType
import net.mamoe.mirai.utils.JavaFriendlyAPI
import net.mamoe.mirai.utils.NotStableForInheritance
import java.util.stream.Stream
/**
* 表示一个群活跃度管理.
*
* ## 获取 [GroupActive] 实例
*
* 只可以通过 [Group.active] 获取一个群的活跃度管理, [GroupActive] 实例.
*
* ### 头衔设置
*
* * 通过 [isHonorVisible] 可以获取和设置一个群的荣誉是否显示,
* * 通过 [isTitleVisible] 可以获取和设置一个群的头衔是否显示,
* * 通过 [isTemperatureVisible] 可以获取和设置一个群的活跃度是否显示,
* * 通过 [rankTitles] 可以获取和设置一个群的等级头衔列表 (PC 端显示),
* * 通过 [temperatureTitles] 可以获取和设置一个群的活跃度头衔列表 (手机端显示)
*
* ### 刷新群成员活跃数据
*
* 通过 [refresh] 可以刷新 [Member.active] 中的属性 (不包括 honors temperature)
*
* ### 活跃度记录
*
* 通过 [asFlow] [asStream] 可以获取群活跃度记录*惰性*,
* 在从流中收集数据时才会请求服务器获取数据. 通常建议在 Kotlin 使用协程的 [asFlow], Java 使用 [asStream].
*
* 若要获取全部活跃度记录, 可使用 [toList].
*
* ### 活跃度图表
*
* 通过 [queryChart] 可以获取活跃度图表
* 包括
* * 每日总人数 [ActiveChart.members]
* * 每日活跃人数 [ActiveChart.actives]
* * 每日申请人数 [ActiveChart.sentences]
* * 每日入群人数 [ActiveChart.join]
* * 每日退群人数 [ActiveChart.exit]
*
* 通过 [queryHonorHistory] 可以获取群荣耀历史数据
* 包括
* * 当前荣耀持有者 (龙王壕礼皇冠, 善财福禄寿) [ActiveHonorList.current]
* * 群荣耀历史记录 [ActiveHonorList.records]
*
* @since 2.13
*/
@NotStableForInheritance
public actual interface GroupActive {
/**
* 是否在群聊中显示荣誉
* @see MemberActive.honors
*/
public actual val isHonorVisible: Boolean
/**
* 设置是否在群聊中显示荣誉
* @see MemberActive.honors
*/
public actual suspend fun setHonorVisible(newValue: Boolean)
/**
* 是否在群聊中显示头衔
* @see Member.rankTitle
* @see Member.temperatureTitle
*/
public actual val isTitleVisible: Boolean
/**
* 设置是否在群聊中显示头衔操作成功时会同时刷新等级头衔信息
* @see Member.rankTitle
* @see Member.temperatureTitle
*/
public actual suspend fun setTitleVisible(newValue: Boolean)
/**
* 是否在群聊中显示活跃度
* @see MemberActive.temperature
*/
public actual val isTemperatureVisible: Boolean
/**
* 设置是否在群聊中显示活跃度操作成功时会同时刷新等级头衔信息
* @see MemberActive.temperature
*/
public actual suspend fun setTemperatureVisible(newValue: Boolean)
/**
* 等级头衔列表键是等级值是头衔
*
* @see Member.rankTitle
*/
public actual val rankTitles: Map<Int, String>
/**
* 设置等级头衔列表键是等级值是头衔操作成功时会同时刷新等级头衔信息
* @see Member.rankTitle
*/
public actual suspend fun setRankTitles(newValue: Map<Int, String>)
/**
* 活跃度头衔列表键是等级值是头衔操作成功时会同时刷新活跃度头衔信息
* @see Member.temperatureTitle
*/
public actual val temperatureTitles: Map<Int, String>
/**
* 设置活跃度头衔列表键是等级值是头衔操作成功时会同时刷新活跃度头衔信息
* @see Member.temperatureTitle
*/
public actual suspend fun setTemperatureTitles(newValue: Map<Int, String>)
/**
* 刷新 [Member.active] 中的属性 (不包括 [honors][MemberActive.honors] [temperature][MemberActive.temperature])
* @see Member.active
*/
public actual suspend fun refresh()
/**
* 创建一个能获取该群内所有群活跃度记录的 [Flow]. [Flow] 被使用时才会分页下载 [ActiveRecord].
*
* 异常不会抛出, 只会记录到网络日志. 当获取发生异常时将会终止获取, 不影响已经成功获取的 [ActiveRecord] [Flow] [收集][Flow.collect].
*/
public actual fun asFlow(): Flow<ActiveRecord>
/**
* 创建一个能获取该群内所有群活跃度记录的 [Stream]. [Stream] 被使用时才会分页下载 [ActiveRecord].
*
* 异常不会抛出, 只会记录到网络日志. 当获取发生异常时将会终止获取, 不影响已经成功获取的 [ActiveRecord] [Stream] [收集][Stream.collect].
*
* 实现细节: 为了适合 Java 调用, 实现类似为阻塞式的 [asFlow], 因此不建议在 Kotlin 使用. Kotlin 请使用 [asFlow].
*/
@JavaFriendlyAPI
public fun asStream(): Stream<ActiveRecord>
/**
* 获取活跃度图表数据
*/
public actual suspend fun queryChart(): ActiveChart
/**
* 获取群荣耀历史数据, 刷新 [Member.active] 中的 [MemberActive.honors]
* @see Member.active
*/
@Suppress("INAPPLICABLE_JVM_NAME")
@JvmName("queryHonorHistory")
public actual suspend fun queryHonorHistory(type: GroupHonorType): ActiveHonorList
/**
* 获取活跃度排行榜通常是前五十名
*/
public actual suspend fun queryActiveRank(): List<ActiveRankRecord>
}

View File

@ -0,0 +1,154 @@
/*
* 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.
*
* https://github.com/mamoe/mirai/blob/dev/LICENSE
*/
package net.mamoe.mirai.contact.active
import kotlinx.coroutines.flow.Flow
import net.mamoe.mirai.contact.Group
import net.mamoe.mirai.contact.Member
import net.mamoe.mirai.data.GroupHonorType
import net.mamoe.mirai.utils.NotStableForInheritance
/**
* 表示一个群活跃度管理.
*
* ## 获取 [GroupActive] 实例
*
* 只可以通过 [Group.active] 获取一个群的活跃度管理, [GroupActive] 实例.
*
* ### 头衔设置
*
* * 通过 [isHonorVisible] 可以获取和设置一个群的荣誉是否显示,
* * 通过 [isTitleVisible] 可以获取和设置一个群的头衔是否显示,
* * 通过 [isTemperatureVisible] 可以获取和设置一个群的活跃度是否显示,
* * 通过 [rankTitles] 可以获取和设置一个群的等级头衔列表 (PC 端显示),
* * 通过 [temperatureTitles] 可以获取和设置一个群的活跃度头衔列表 (手机端显示)
*
* ### 刷新群成员活跃数据
*
* 通过 [refresh] 可以刷新 [Member.active] 中的属性 (不包括 honors temperature)
*
* ### 活跃度记录
*
* 通过 [asFlow] 可以获取群活跃度记录*惰性*.
*
* 若要获取全部活跃度记录, 可使用 [toList].
*
* ### 活跃度图表
*
* 通过 [queryChart] 可以获取活跃度图表
* 包括
* * 每日总人数 [ActiveChart.members]
* * 每日活跃人数 [ActiveChart.actives]
* * 每日申请人数 [ActiveChart.sentences]
* * 每日入群人数 [ActiveChart.join]
* * 每日退群人数 [ActiveChart.exit]
*
* 通过 [queryHonorHistory] 可以获取群荣耀历史数据
* 包括
* * 当前荣耀持有者 (龙王壕礼皇冠, 善财福禄寿) [ActiveHonorList.current]
* * 群荣耀历史记录 [ActiveHonorList.records]
*
* @since 2.13
*/
@NotStableForInheritance
public actual interface GroupActive {
/**
* 是否在群聊中显示荣誉
* @see MemberActive.honors
*/
public actual val isHonorVisible: Boolean
/**
* 设置是否在群聊中显示荣誉
* @see MemberActive.honors
*/
public actual suspend fun setHonorVisible(newValue: Boolean)
/**
* 是否在群聊中显示头衔
* @see Member.rankTitle
* @see Member.temperatureTitle
*/
public actual val isTitleVisible: Boolean
/**
* 设置是否在群聊中显示头衔操作成功时会同时刷新等级头衔信息
* @see Member.rankTitle
* @see Member.temperatureTitle
*/
public actual suspend fun setTitleVisible(newValue: Boolean)
/**
* 是否在群聊中显示活跃度
* @see MemberActive.temperature
*/
public actual val isTemperatureVisible: Boolean
/**
* 设置是否在群聊中显示活跃度操作成功时会同时刷新等级头衔信息
* @see MemberActive.temperature
*/
public actual suspend fun setTemperatureVisible(newValue: Boolean)
/**
* 等级头衔列表键是等级值是头衔
*
* @see Member.rankTitle
*/
public actual val rankTitles: Map<Int, String>
/**
* 设置等级头衔列表键是等级值是头衔操作成功时会同时刷新等级头衔信息
* @see Member.rankTitle
*/
public actual suspend fun setRankTitles(newValue: Map<Int, String>)
/**
* 活跃度头衔列表键是等级值是头衔操作成功时会同时刷新活跃度头衔信息
* @see Member.temperatureTitle
*/
public actual val temperatureTitles: Map<Int, String>
/**
* 设置活跃度头衔列表键是等级值是头衔操作成功时会同时刷新活跃度头衔信息
* @see Member.temperatureTitle
*/
public actual suspend fun setTemperatureTitles(newValue: Map<Int, String>)
/**
* 刷新 [Member.active] 中的属性 (不包括 [honors][MemberActive.honors] [temperature][MemberActive.temperature])
* @see Member.active
*/
public actual suspend fun refresh()
/**
* 创建一个能获取该群内所有群活跃度记录的 [Flow]. [Flow] 被使用时才会分页下载 [ActiveRecord].
*
* 异常不会抛出, 只会记录到网络日志. 当获取发生异常时将会终止获取, 不影响已经成功获取的 [ActiveRecord] [Flow] [收集][Flow.collect].
*/
public actual fun asFlow(): Flow<ActiveRecord>
/**
* 获取活跃度图表数据
*/
public actual suspend fun queryChart(): ActiveChart
/**
* 获取群荣耀历史数据, 刷新 [Member.active] 中的 [MemberActive.honors]
* @see Member.active
*/
public actual suspend fun queryHonorHistory(type: GroupHonorType): ActiveHonorList
/**
* 获取活跃度排行榜通常是前五十名
*/
public actual suspend fun queryActiveRank(): List<ActiveRankRecord>
}

View File

@ -21,6 +21,7 @@ import net.mamoe.mirai.event.events.MemberHonorChangeEvent
import net.mamoe.mirai.event.events.MemberJoinRequestEvent
import net.mamoe.mirai.mock.MockBot
import net.mamoe.mirai.mock.MockBotDSL
import net.mamoe.mirai.mock.contact.active.MockGroupActive
import net.mamoe.mirai.mock.contact.announcement.MockAnnouncements
import net.mamoe.mirai.mock.userprofile.MockMemberInfoBuilder
import net.mamoe.mirai.utils.cast
@ -36,6 +37,7 @@ public interface MockGroup : Group, MockContact, MockMsgSyncSupport {
override val botAsMember: MockNormalMember
override val avatarUrl: String
override val announcements: MockAnnouncements
override val active: MockGroupActive
public interface MockApi : MockContact.MockApi {
override var avatarUrl: String

View File

@ -13,6 +13,7 @@ import me.him188.kotlin.jvm.blocking.bridge.JvmBlockingBridge
import net.mamoe.mirai.contact.Member
import net.mamoe.mirai.contact.MemberPermission
import net.mamoe.mirai.mock.MockBotDSL
import net.mamoe.mirai.mock.contact.active.MockMemberActive
@JvmBlockingBridge
public interface MockMember : Member, MockContact, MockUser {
@ -30,4 +31,6 @@ public interface MockMember : Member, MockContact, MockUser {
*/
@MockBotDSL
public override val mockApi: MockApi
override val active: MockMemberActive
}

View File

@ -0,0 +1,42 @@
/*
* 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.
*
* https://github.com/mamoe/mirai/blob/dev/LICENSE
*/
package net.mamoe.mirai.mock.contact.active
import net.mamoe.mirai.contact.active.*
import net.mamoe.mirai.data.GroupHonorType
public interface MockGroupActive : GroupActive {
/**
* 设置该群内所有群活跃度记录
* @see asFlow
* @see asStream
*/
public fun mockSetActiveRecords(records: Collection<ActiveRecord>)
/**
* 设置活跃度图表数据
* @see queryChart
*/
public fun mockSetChart(chart: ActiveChart)
/**
* 设置群荣耀历史数据
* @see queryHonorHistory
*/
@Suppress("INAPPLICABLE_JVM_NAME")
@JvmName("mockSetHonorHistory")
public fun mockSetHonorHistory(type: GroupHonorType, activeHonorList: ActiveHonorList?)
/**
* 设置活跃度排行榜
* @see queryActiveRank
*/
public fun mockSetRankRecords(list: List<ActiveRankRecord>)
}

View File

@ -0,0 +1,41 @@
/*
* 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.
*
* https://github.com/mamoe/mirai/blob/dev/LICENSE
*/
package net.mamoe.mirai.mock.contact.active
import net.mamoe.mirai.contact.active.MemberActive
import net.mamoe.mirai.contact.active.MemberMedalInfo
import net.mamoe.mirai.data.GroupHonorType
public interface MockMemberActive : MemberActive {
/**
* @see rank
*/
public fun mockSetRank(value: Int)
/**
* @see point
*/
public fun mockSetPoint(value: Int)
/**
* @see honors
*/
public fun mockSetHonors(value: Set<GroupHonorType>)
/**
* @see temperature
*/
public fun mockSetTemperature(value: Int)
/**
* @see queryMedal
*/
public fun mockSetMedal(info: MemberMedalInfo)
}

View File

@ -25,6 +25,8 @@ import net.mamoe.mirai.mock.MockBot
import net.mamoe.mirai.mock.contact.MockAnonymousMember
import net.mamoe.mirai.mock.contact.MockGroup
import net.mamoe.mirai.mock.contact.MockMember
import net.mamoe.mirai.mock.contact.active.MockMemberActive
import net.mamoe.mirai.mock.internal.contact.active.MockMemberActiveImpl
import net.mamoe.mirai.mock.internal.msgsrc.OnlineMsgSrcFromGroup
import net.mamoe.mirai.mock.internal.msgsrc.newMsgSrc
import net.mamoe.mirai.utils.ExternalResource
@ -67,6 +69,7 @@ internal class MockAnonymousMemberImpl(
}
override val specialTitle: String
get() = "匿名"
override val active: MockMemberActive by lazy { MockMemberActiveImpl() }
override suspend fun mute(durationSeconds: Int) {
}

View File

@ -29,12 +29,13 @@ import net.mamoe.mirai.mock.contact.MockAnonymousMember
import net.mamoe.mirai.mock.contact.MockGroup
import net.mamoe.mirai.mock.contact.MockGroupControlPane
import net.mamoe.mirai.mock.contact.MockNormalMember
import net.mamoe.mirai.mock.contact.active.MockGroupActive
import net.mamoe.mirai.mock.internal.contact.active.MockGroupActiveImpl
import net.mamoe.mirai.mock.internal.msgsrc.OnlineMsgSrcToGroup
import net.mamoe.mirai.mock.internal.msgsrc.newMsgSrc
import net.mamoe.mirai.mock.utils.broadcastBlocking
import net.mamoe.mirai.mock.utils.mock
import net.mamoe.mirai.utils.*
import java.util.*
import java.util.concurrent.CancellationException
import kotlin.coroutines.CoroutineContext
@ -47,13 +48,15 @@ internal class MockGroupImpl(
) : AbstractMockContact(
parentCoroutineContext, bot, id
), MockGroup {
override val honorMembers: MutableMap<GroupHonorType, MockNormalMember> = EnumMap(GroupHonorType::class.java)
override val honorMembers: MutableMap<GroupHonorType, MockNormalMember> = ConcurrentHashMap()
private val txFileSystem by lazy { bot.mock().tmpResourceServer.mockServerFileDisk.newFsSystem() }
override fun avatarUrl(spec: AvatarSpec): String {
return avatarUrl
}
override val active: MockGroupActive by lazy { MockGroupActiveImpl(this) }
override fun changeHonorMember(member: MockNormalMember, honorType: GroupHonorType) {
val onm = honorMembers[honorType]
honorMembers[honorType] = member

View File

@ -22,6 +22,8 @@ import net.mamoe.mirai.mock.MockBot
import net.mamoe.mirai.mock.contact.MockFriend
import net.mamoe.mirai.mock.contact.MockGroup
import net.mamoe.mirai.mock.contact.MockNormalMember
import net.mamoe.mirai.mock.contact.active.MockMemberActive
import net.mamoe.mirai.mock.internal.contact.active.MockMemberActiveImpl
import net.mamoe.mirai.mock.internal.msgsrc.OnlineMsgSrcFromGroup
import net.mamoe.mirai.mock.internal.msgsrc.OnlineMsgSrcToTemp
import net.mamoe.mirai.mock.internal.msgsrc.newMsgSrc
@ -106,7 +108,7 @@ internal class MockNormalMemberImpl(
override val permission: MemberPermission
get() = mockApi.permission
override val active: MockMemberActive by lazy { MockMemberActiveImpl() }
override val joinTimestamp: Int
get() = mockApi.joinTimestamp

View File

@ -0,0 +1,118 @@
/*
* 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.
*
* https://github.com/mamoe/mirai/blob/dev/LICENSE
*/
package net.mamoe.mirai.mock.internal.contact.active
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.asFlow
import net.mamoe.mirai.contact.MemberPermission
import net.mamoe.mirai.contact.active.ActiveChart
import net.mamoe.mirai.contact.active.ActiveHonorList
import net.mamoe.mirai.contact.active.ActiveRankRecord
import net.mamoe.mirai.contact.active.ActiveRecord
import net.mamoe.mirai.contact.checkBotPermission
import net.mamoe.mirai.data.GroupHonorType
import net.mamoe.mirai.mock.contact.active.MockGroupActive
import net.mamoe.mirai.mock.internal.contact.MockGroupImpl
import net.mamoe.mirai.utils.ConcurrentHashMap
import net.mamoe.mirai.utils.JavaFriendlyAPI
import net.mamoe.mirai.utils.asImmutable
import java.util.stream.Stream
import kotlin.collections.set
internal class MockGroupActiveImpl(
private val group: MockGroupImpl
) : MockGroupActive {
@Volatile
override var isHonorVisible: Boolean = false
override suspend fun setHonorVisible(newValue: Boolean) {
group.checkBotPermission(MemberPermission.ADMINISTRATOR)
isHonorVisible = newValue
}
@Volatile
override var isTitleVisible: Boolean = false
override suspend fun setTitleVisible(newValue: Boolean) {
group.checkBotPermission(MemberPermission.ADMINISTRATOR)
isTitleVisible = newValue
}
@Volatile
override var isTemperatureVisible: Boolean = false
override suspend fun setTemperatureVisible(newValue: Boolean) {
group.checkBotPermission(MemberPermission.ADMINISTRATOR)
isTemperatureVisible = newValue
}
@Volatile
override var rankTitles: Map<Int, String> = ConcurrentHashMap()
override suspend fun setRankTitles(newValue: Map<Int, String>) {
group.checkBotPermission(MemberPermission.ADMINISTRATOR)
rankTitles = newValue
}
@Volatile
override var temperatureTitles: Map<Int, String> = ConcurrentHashMap()
override suspend fun setTemperatureTitles(newValue: Map<Int, String>) {
group.checkBotPermission(MemberPermission.ADMINISTRATOR)
temperatureTitles = newValue
}
override suspend fun refresh() {
}
@Volatile
private var records: Collection<ActiveRecord> = listOf()
override fun asFlow(): Flow<ActiveRecord> = records.asFlow()
@JavaFriendlyAPI
override fun asStream(): Stream<ActiveRecord> = records.stream()
@Volatile
private var activeChart: ActiveChart = ActiveChart(mapOf(), mapOf(), mapOf(), mapOf(), mapOf())
override suspend fun queryChart(): ActiveChart = activeChart
private var honorHistories: MutableMap<GroupHonorType, ActiveHonorList> = ConcurrentHashMap()
override suspend fun queryHonorHistory(type: GroupHonorType): ActiveHonorList {
return honorHistories.getOrElse(type) { ActiveHonorList(type, null, listOf()) }
}
@Volatile
private var ranks: List<ActiveRankRecord> = listOf()
override suspend fun queryActiveRank(): List<ActiveRankRecord> = ranks.asImmutable()
///////////////////////////////////////////////////////////////////////////
// mock API
///////////////////////////////////////////////////////////////////////////
override fun mockSetActiveRecords(records: Collection<ActiveRecord>) {
this.records = records
}
override fun mockSetChart(chart: ActiveChart) {
activeChart = chart
}
override fun mockSetHonorHistory(type: GroupHonorType, activeHonorList: ActiveHonorList?) {
if (activeHonorList != null) {
honorHistories[type] = activeHonorList
} else {
honorHistories.remove(type)
}
}
override fun mockSetRankRecords(list: List<ActiveRankRecord>) {
this.ranks = list
}
}

View File

@ -0,0 +1,47 @@
/*
* 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.
*
* https://github.com/mamoe/mirai/blob/dev/LICENSE
*/
package net.mamoe.mirai.mock.internal.contact.active
import net.mamoe.mirai.contact.active.MemberMedalInfo
import net.mamoe.mirai.contact.active.MemberMedalType
import net.mamoe.mirai.data.GroupHonorType
import net.mamoe.mirai.mock.contact.active.MockMemberActive
internal class MockMemberActiveImpl : MockMemberActive {
override fun mockSetRank(value: Int) {
rank = value
}
override fun mockSetPoint(value: Int) {
point = value
}
override fun mockSetHonors(value: Set<GroupHonorType>) {
honors = value
}
override fun mockSetTemperature(value: Int) {
temperature = value
}
override fun mockSetMedal(info: MemberMedalInfo) {
medal = info
}
override var rank: Int = 0
override var point: Int = 0
override var honors: Set<GroupHonorType> = setOf()
override var temperature: Int = 0
@Volatile
var medal: MemberMedalInfo = MemberMedalInfo("", "", MemberMedalType.ACTIVE, setOf())
override suspend fun queryMedal(): MemberMedalInfo = medal
}

View File

@ -10,10 +10,7 @@
package net.mamoe.mirai.mock.userprofile
import net.mamoe.mirai.contact.MemberPermission
import net.mamoe.mirai.data.FriendInfo
import net.mamoe.mirai.data.MemberInfo
import net.mamoe.mirai.data.StrangerInfo
import net.mamoe.mirai.data.UserInfo
import net.mamoe.mirai.data.*
import net.mamoe.mirai.utils.currentTimeSeconds
public interface MockUserInfoBuilder {
@ -71,6 +68,13 @@ public interface MockMemberInfoBuilder : MockUserInfoBuilder {
public fun isOfficialBot(value: Boolean): MockMemberInfoBuilder
public fun rank(value: Int): MockMemberInfoBuilder
public fun temperature(value: Int): MockMemberInfoBuilder
public fun honors(value: Set<GroupHonorType>): MockMemberInfoBuilder
public fun point(value: Int): MockMemberInfoBuilder
public fun permission(value: MemberPermission): MockMemberInfoBuilder
override fun uin(value: Long): MockMemberInfoBuilder
@ -130,6 +134,10 @@ private class ThreeInOneInfoBuilder :
override var joinTimestamp: Int = currentTimeSeconds().toInt()
override var lastSpeakTimestamp: Int = 0
override var isOfficialBot: Boolean = false
override var rank: Int = 0
override var point: Int = 0
override var honors: Set<GroupHonorType> = setOf()
override var temperature: Int = 0
override var fromGroup: Long = 0L
override var remark: String = ""
override var uin: Long = 0
@ -149,6 +157,10 @@ private class ThreeInOneInfoBuilder :
override fun uin(value: Long): ThreeInOneInfoBuilder = apply { this.uin = value }
override fun nick(value: String): ThreeInOneInfoBuilder = apply { this.nick = value }
override fun remark(value: String): ThreeInOneInfoBuilder = apply { this.remark = value }
override fun rank(value: Int): MockMemberInfoBuilder = apply { this.rank = value }
override fun point(value: Int): MockMemberInfoBuilder = apply { this.point = value }
override fun temperature(value: Int): MockMemberInfoBuilder = apply { this.temperature = value }
override fun honors(value: Set<GroupHonorType>): MockMemberInfoBuilder = apply { this.honors = value }
override fun permission(value: MemberPermission): ThreeInOneInfoBuilder = apply { this.permission = value }
override fun friendGroupId(value: Int): ThreeInOneInfoBuilder = apply { this.friendGroupId = value }
}

View File

@ -10,6 +10,7 @@
package net.mamoe.mirai.mock.utils
import net.mamoe.mirai.contact.MemberPermission
import net.mamoe.mirai.data.GroupHonorType
import net.mamoe.mirai.data.MemberInfo
public fun simpleMemberInfo(
@ -29,6 +30,14 @@ public fun simpleMemberInfo(
override val joinTimestamp: Int get() = 0
override val lastSpeakTimestamp: Int get() = 0
override val isOfficialBot: Boolean get() = false
override val rank: Int
get() = 0
override val point: Int
get() = 0
override val honors: Set<GroupHonorType>
get() = setOf()
override val temperature: Int
get() = 0
override val uin: Long get() = uin
override val nick: String get() = nick
override val remark: String get() = remark

View File

@ -170,15 +170,16 @@ internal class MockGroupTest : MockBotTestBase() {
val group = bot.addGroup(111, "aa")
val member1 = group.addMember(simpleMemberInfo(222, "bb", permission = MemberPermission.MEMBER))
val member2 = group.addMember(simpleMemberInfo(333, "cc", permission = MemberPermission.MEMBER))
group.honorMembers[GroupHonorType.ACTIVE] = member1
group.changeHonorMember(member2, GroupHonorType.ACTIVE)
group.honorMembers[GroupHonorType.TALKATIVE] = member1
group.changeHonorMember(member2, GroupHonorType.TALKATIVE)
}.let { events ->
assertEquals(2, events.size)
assertIsInstance<MemberHonorChangeEvent.Lose>(events[0])
assertEquals(222, events[0].cast<MemberHonorChangeEvent.Lose>().member.id)
assertEquals(GroupHonorType.ACTIVE, events[1].cast<MemberHonorChangeEvent.Achieve>().honorType)
assertEquals(333, events[1].cast<MemberHonorChangeEvent.Achieve>().member.id)
assertIsInstance<MemberHonorChangeEvent.Achieve>(events[1])
assertEquals(3, events.size)
assertIsInstance<GroupTalkativeChangeEvent>(events[0])
assertIsInstance<MemberHonorChangeEvent.Lose>(events[1])
assertEquals(222, events[1].cast<MemberHonorChangeEvent.Lose>().member.id)
assertIsInstance<MemberHonorChangeEvent.Achieve>(events[2])
assertEquals(GroupHonorType.TALKATIVE, events[2].cast<MemberHonorChangeEvent.Achieve>().honorType)
assertEquals(333, events[2].cast<MemberHonorChangeEvent.Achieve>().member.id)
}
}

View File

@ -526,57 +526,6 @@ internal open class MiraiImpl : IMirai, LowLevelApiAccessor {
ignoreUnknownKeys = true
}
@LowLevelApi
@MiraiExperimentalApi
override suspend fun getRawGroupActiveData(bot: Bot, groupId: Long, page: Int): GroupActiveData =
bot.asQQAndroidBot().run {
val rep = network.run {
httpClient.get() {
url("https://qqweb.qq.com/c/activedata/get_mygroup_data")
parameter("bkn", client.wLoginSigInfo.bkn)
parameter("gc", groupId)
if (page != -1) {
parameter("page", page)
}
headers {
// ktor bug
append(
"cookie",
"uin=o${bot.id}; skey=${bot.sKey}; p_uin=o${bot.id}; p_skey=${bot.psKey("qqweb.qq.com")};"
)
}
}
}
return json.decodeFromString(GroupActiveData.serializer(), rep.bodyAsText())
}
@LowLevelApi
@MiraiExperimentalApi
override suspend fun getRawGroupHonorListData(
bot: Bot,
groupId: Long,
type: GroupHonorType
): GroupHonorListData? = bot.asQQAndroidBot().run {
val rep = network.run {
httpClient.get {
url("https://qun.qq.com/interactive/honorlist")
parameter("gc", groupId)
parameter("type", type.value)
headers {
// ktor bug
append(
"cookie",
"uin=o${bot.id};" +
" skey=${bot.sKey};" +
" p_uin=o${bot.id};" +
" p_skey=${bot.psKey("qun.qq.com")}; "
)
}
}
}
val jsonText = Regex("""window.__INITIAL_STATE__=(.+?)</script>""").find(rep.bodyAsText())?.groupValues?.get(1)
return jsonText?.let { json.decodeFromString(GroupHonorListData.serializer(), it) }
}
override suspend fun solveNewFriendRequestEvent(
bot: Bot,

View File

@ -29,5 +29,7 @@ internal sealed class AbstractMember(
override val nameCard: String get() = info.nameCard
override val specialTitle: String get() = info.specialTitle
override val active: MemberActiveImpl = MemberActiveImpl(info, group)
override var permission: MemberPermission by info::permission
}

View File

@ -16,13 +16,16 @@ import kotlinx.atomicfu.atomic
import net.mamoe.mirai.Bot
import net.mamoe.mirai.LowLevelApi
import net.mamoe.mirai.contact.*
import net.mamoe.mirai.contact.active.GroupActive
import net.mamoe.mirai.contact.announcement.Announcements
import net.mamoe.mirai.contact.file.RemoteFiles
import net.mamoe.mirai.data.GroupHonorType
import net.mamoe.mirai.data.GroupInfo
import net.mamoe.mirai.data.MemberInfo
import net.mamoe.mirai.event.broadcast
import net.mamoe.mirai.event.events.*
import net.mamoe.mirai.internal.QQAndroidBot
import net.mamoe.mirai.internal.contact.active.GroupActiveImpl
import net.mamoe.mirai.internal.contact.announcement.AnnouncementsImpl
import net.mamoe.mirai.internal.contact.file.RemoteFilesImpl
import net.mamoe.mirai.internal.contact.info.MemberInfoImpl
@ -132,7 +135,7 @@ internal abstract class CommonGroupImpl constructor(
parentCoroutineContext: CoroutineContext,
override val id: Long,
groupInfo: GroupInfo,
override val members: ContactList<NormalMemberImpl>,
final override val members: ContactList<NormalMemberImpl>,
) : Group, AbstractContact(bot, parentCoroutineContext) {
companion object
@ -146,7 +149,7 @@ internal abstract class CommonGroupImpl constructor(
final override val files: RemoteFiles by lazy { RemoteFilesImpl(this) }
val lastTalkative = atomic<NormalMemberImpl?>(null)
val lastTalkative = atomic(members.find { GroupHonorType.TALKATIVE in it.active.honors })
final override val announcements: Announcements by lazy {
AnnouncementsImpl(
@ -155,6 +158,14 @@ internal abstract class CommonGroupImpl constructor(
)
}
final override val active: GroupActive by lazy {
GroupActiveImpl(
this as GroupImpl,
bot.network.logger.subLogger("Group $id"),
groupInfo
)
}
val groupPkgMsgParsingCache = GroupPkgMsgParsingCache()
private val messageProtocolStrategy: MessageProtocolStrategy<GroupImpl> = GroupMessageProtocolStrategy(this.cast())

View File

@ -0,0 +1,26 @@
/*
* 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.
*
* https://github.com/mamoe/mirai/blob/dev/LICENSE
*/
package net.mamoe.mirai.internal.contact
import net.mamoe.mirai.contact.active.MemberActive
import net.mamoe.mirai.contact.active.MemberMedalInfo
import net.mamoe.mirai.data.GroupHonorType
import net.mamoe.mirai.internal.contact.active.GroupActiveImpl
import net.mamoe.mirai.internal.contact.info.MemberInfoImpl
internal class MemberActiveImpl(private val info: MemberInfoImpl, private val group: GroupImpl) : MemberActive {
override val rank: Int get() = info.rank
override val point: Int get() = info.point
override val honors: Set<GroupHonorType> get() = info.honors
override val temperature: Int get() = info.temperature
override suspend fun queryMedal(): MemberMedalInfo {
return (group.active as GroupActiveImpl).queryMemberMedal(uid = info.uin)
}
}

View File

@ -0,0 +1,244 @@
/*
* 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.
*
* https://github.com/mamoe/mirai/blob/dev/LICENSE
*/
package net.mamoe.mirai.internal.contact.active
import kotlinx.coroutines.currentCoroutineContext
import kotlinx.coroutines.flow.*
import kotlinx.coroutines.isActive
import net.mamoe.mirai.contact.MemberPermission
import net.mamoe.mirai.contact.active.*
import net.mamoe.mirai.contact.checkBotPermission
import net.mamoe.mirai.data.GroupHonorType
import net.mamoe.mirai.data.GroupInfo
import net.mamoe.mirai.internal.contact.GroupImpl
import net.mamoe.mirai.internal.contact.groupCode
import net.mamoe.mirai.utils.MiraiLogger
import net.mamoe.mirai.utils.check
internal expect class GroupActiveImpl(
group: GroupImpl,
logger: MiraiLogger,
groupInfo: GroupInfo,
) : CommonGroupActiveImpl
internal abstract class CommonGroupActiveImpl(
protected val group: GroupImpl,
protected val logger: MiraiLogger,
groupInfo: GroupInfo,
) : GroupActive {
private var _isHonorVisible: Boolean = groupInfo.isHonorVisible
private var _isTitleVisible: Boolean = groupInfo.isTitleVisible
private var _isTemperatureVisible: Boolean = groupInfo.isTemperatureVisible
private var _isRankVisible: Map<Int, String> = groupInfo.rankTitles
private var _temperatureTitles: Map<Int, String> = groupInfo.temperatureTitles
private suspend fun getGroupLevelInfo(): GroupLevelInfo {
return group.bot.getRawGroupLevelInfo(groupCode = group.groupCode).check()
}
private suspend fun refreshRank() {
val info = getGroupLevelInfo()
_isTitleVisible = info.levelFlag == 1
_isTemperatureVisible = info.levelNewFlag == 1
_isRankVisible = info.levelName.mapKeys { (level, _) -> level.removePrefix("lvln").toInt() }
_temperatureTitles = info.levelNewName.mapKeys { (level, _) -> level.removePrefix("lvln").toInt() }
}
override val isHonorVisible: Boolean get() = _isHonorVisible
override suspend fun setHonorVisible(newValue: Boolean) {
group.checkBotPermission(MemberPermission.ADMINISTRATOR)
group.bot.setGroupHonourFlag(groupCode = group.groupCode, flag = newValue).check()
_isHonorVisible = newValue
}
override val rankTitles: Map<Int, String> get() = _isRankVisible
override suspend fun setRankTitles(newValue: Map<Int, String>) {
group.checkBotPermission(MemberPermission.ADMINISTRATOR)
group.bot.setGroupLevelInfo(groupCode = group.groupCode, new = false, titles = newValue).check()
refreshRank()
}
override val isTitleVisible: Boolean get() = _isTitleVisible
override suspend fun setTitleVisible(newValue: Boolean) {
group.checkBotPermission(MemberPermission.ADMINISTRATOR)
group.bot.setGroupSetting(groupCode = group.groupCode, new = false, show = newValue).check()
refreshRank()
}
override val temperatureTitles: Map<Int, String> get() = _temperatureTitles
override suspend fun setTemperatureTitles(newValue: Map<Int, String>) {
group.checkBotPermission(MemberPermission.ADMINISTRATOR)
group.bot.setGroupLevelInfo(groupCode = group.groupCode, new = true, titles = newValue).check()
refreshRank()
}
override val isTemperatureVisible: Boolean get() = _isTemperatureVisible
override suspend fun setTemperatureVisible(newValue: Boolean) {
group.checkBotPermission(MemberPermission.ADMINISTRATOR)
group.bot.setGroupSetting(groupCode = group.groupCode, new = true, show = newValue).check()
refreshRank()
}
override suspend fun refresh() {
val info = group.bot.getRawMemberLevelInfo(groupCode = group.groupCode).check()
refreshRank()
_isHonorVisible = info.honourFlag == 1
_isTitleVisible = info.levelFlag == 1
_isRankVisible = info.levelName.mapKeys { (level, _) -> level.removePrefix("lvln").toInt() }
for (member in group.members) {
val (_, _, point, rank) = info.lv[member.id] ?: continue
member.info.point = point
member.info.rank = rank
}
}
protected suspend fun getGroupActiveData(page: Int?): GroupActiveData {
return group.bot.getRawGroupActiveData(group.id, page).check()
}
override fun asFlow(): Flow<ActiveRecord> {
return flow {
var page = 0
while (currentCoroutineContext().isActive) {
val result = getGroupActiveData(page = page)
val most = result.info.mostAct ?: break
for (active in most) emit(active.toActiveRecord(group))
if (result.info.isEnd == 1) break
page++
}
}
}
override suspend fun queryChart(): ActiveChart {
return getGroupActiveData(page = null).info.toActiveChart()
}
private suspend fun getHonorInfo(type: GroupHonorType): MemberHonorList {
return when (type) {
GroupHonorType.TALKATIVE -> group.bot.getRawTalkativeInfo(group.id)
GroupHonorType.PERFORMER -> group.bot.getRawContinuousInfo(group.id, type.id)
GroupHonorType.LEGEND -> group.bot.getRawContinuousInfo(group.id, type.id)
GroupHonorType.STRONG_NEWBIE -> group.bot.getRawContinuousInfo(group.id, type.id)
GroupHonorType.EMOTION -> group.bot.getRawEmotionInfo(group.id)
GroupHonorType.BRONZE -> group.bot.getRawHomeworkExcellentInfo(group.id, 1)
GroupHonorType.SILVER -> group.bot.getRawHomeworkExcellentInfo(group.id, 2)
GroupHonorType.GOLDEN -> group.bot.getRawHomeworkExcellentInfo(group.id, 3)
GroupHonorType.WHIRLWIND -> group.bot.getRawHomeworkActiveInfo(group.id)
GroupHonorType.RICHER -> group.bot.getRawRicherHonorInfo(group.id)
GroupHonorType.RED_PACKET -> group.bot.getRawRedPacketInfo(group.id)
else -> group.bot.getRawContinuousInfo(group.id, type.id)
}
}
override suspend fun queryHonorHistory(type: GroupHonorType): ActiveHonorList {
val data = getHonorInfo(type)
when (type) {
GroupHonorType.TALKATIVE, GroupHonorType.RICHER, GroupHonorType.RED_PACKET -> {
val current = data.current?.uin
for (member in group.members) {
if (member.id != current) {
member.info.honors += type
} else {
member.info.honors -= type
}
}
data.current?.let { group.members[it.uin] }?.let { it.info.honors += type }
}
GroupHonorType.LEGEND -> {
val current = data.list.mapTo(HashSet()) { it.uin }
for (member in group.members) {
if (member.id in current) {
member.info.honors += GroupHonorType.LEGEND
member.info.honors -= GroupHonorType.PERFORMER
} else {
member.info.honors -= GroupHonorType.LEGEND
}
}
}
else -> {
val current = data.list.mapTo(HashSet()) { it.uin }
for (member in group.members) {
if (member.id in current) {
member.info.honors += type
} else {
member.info.honors -= type
}
}
}
}
@Suppress("INVISIBLE_MEMBER")
return ActiveHonorList(
type = type,
current = data.current?.toActiveHonorInfo(group),
records = data.list.map { it.toActiveHonorInfo(group) },
)
}
private suspend fun getMemberScoreData(): MemberScoreData {
return group.bot.getRawMemberTitleList(group.id).check()
}
override suspend fun queryActiveRank(): List<ActiveRankRecord> {
val data = getMemberScoreData()
@Suppress("INVISIBLE_MEMBER")
return data.members.map {
ActiveRankRecord(
memberId = it.uin,
memberName = it.nickName,
member = group.get(id = it.uin),
temperature = it.levelId,
score = it.score
)
}
}
private suspend fun getMemberMedalInfo(uid: Long): MemberMedalData {
return group.bot.getRawMemberMedalInfo(group.id, uid)
}
suspend fun queryMemberMedal(uid: Long): MemberMedalInfo {
val info = getMemberMedalInfo(uid = uid)
val medals: MutableSet<MemberMedalType> = HashSet()
var worn: MemberMedalType = MemberMedalType.ACTIVE
for (item in info.list) {
if (item.achieveTs == 0) continue
val type = when (item.mask) {
MemberMedalType.OWNER.mask -> MemberMedalType.OWNER
MemberMedalType.ADMIN.mask -> MemberMedalType.ADMIN
MemberMedalType.SPECIAL.mask -> MemberMedalType.SPECIAL
MemberMedalType.ACTIVE.mask -> MemberMedalType.ACTIVE
else -> continue
}
medals.add(type)
if (item.wearTs != 0) worn = type
}
@Suppress("INVISIBLE_MEMBER")
return MemberMedalInfo(
title = info.weared,
color = info.wearedColor,
wearing = worn,
medals = medals
)
}
}

View File

@ -0,0 +1,692 @@
/*
* 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.
*
* https://github.com/mamoe/mirai/blob/dev/LICENSE
*/
package net.mamoe.mirai.internal.contact.active
import io.ktor.client.request.*
import io.ktor.client.request.forms.*
import io.ktor.client.statement.*
import io.ktor.http.*
import kotlinx.serialization.KSerializer
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
import kotlinx.serialization.json.Json
import kotlinx.serialization.json.JsonElement
import net.mamoe.mirai.contact.Group
import net.mamoe.mirai.contact.active.*
import net.mamoe.mirai.data.GroupHonorType
import net.mamoe.mirai.internal.QQAndroidBot
import net.mamoe.mirai.internal.contact.GroupImpl
import net.mamoe.mirai.internal.network.components.HttpClientProvider
import net.mamoe.mirai.internal.network.psKey
import net.mamoe.mirai.internal.network.sKey
import net.mamoe.mirai.utils.*
@Serializable
internal data class SetResult(
@SerialName("ec") override val errorCode: Int = 0,
@SerialName("em") override val errorMessage: String? = null,
@SerialName("errcode") val errCode: Int?
) : CheckableResponseA(), JsonStruct
/**
* 群等级信息
*/
@Serializable
internal data class GroupLevelInfo(
@SerialName("ec") override val errorCode: Int = 0,
@SerialName("em") override val errorMessage: String? = null,
@SerialName("errcode") val errCode: Int?,
@SerialName("levelflag") val levelFlag: Int = 0,
@SerialName("levelname") val levelName: Map<String, String> = emptyMap(),
@SerialName("levelnewflag") val levelNewFlag: Int = 0,
@SerialName("levelnewname") val levelNewName: Map<String, String> = emptyMap()
) : CheckableResponseA(), JsonStruct
@Serializable
internal data class MemberLevelInfo(
@SerialName("ec") override val errorCode: Int = 0,
@SerialName("em") override val errorMessage: String? = null,
@SerialName("errcode") val errCode: Int?,
@SerialName("role") val role: Int = 0,
@SerialName("mems") val mems: Map<Long, MemberInfo> = emptyMap(),
@SerialName("lv") val lv: Map<Long, LevelInfo> = emptyMap(),
@SerialName("levelflag") val levelFlag: Int = 0,
@SerialName("levelname") val levelName: Map<String, String> = emptyMap(),
@SerialName("honourflag") val honourFlag: Int = 0
) : CheckableResponseA(), JsonStruct {
@Serializable
data class MemberInfo(
@SerialName("u") val u: Long = 0, @SerialName("g") val g: Int = 0, @SerialName("n") val n: String = ""
)
@Serializable
data class LevelInfo(
@SerialName("u") val u: Long = 0,
@SerialName("d") val d: Int = 0,
@SerialName("p") val p: Int = 0,
@SerialName("l") val l: Int = 1
)
}
/**
* 群统计信息
*/
@Serializable
internal data class GroupActiveData(
@SerialName("ec") override val errorCode: Int = 0,
@SerialName("em") override val errorMessage: String? = null,
@SerialName("errcode") val errCode: Int?,
@SerialName("ginfo") val info: ActiveInfo,
@SerialName("query") val query: Int? = 0,
@SerialName("role") val role: Int? = 0
) : CheckableResponseA(), JsonStruct {
@Serializable
data class Situation(
@SerialName("date") val date: String, @SerialName("num") val num: Int
)
@Serializable
data class MostActive(
@SerialName("name") val name: String, // 名称 不完整
@SerialName("sentences_num") val sentencesNum: Int, // 发言数
@SerialName("sta") val sta: Int = 0, @SerialName("uin") val uin: Long = 0
)
@Serializable
data class ActiveInfo(
@SerialName("g_act_num") val actNum: List<Situation>? = null, //发言人数列表
@SerialName("g_createtime") val createTime: Int? = 0,
@SerialName("g_exit_num") val exitNum: List<Situation>? = null, //退群人数列表
@SerialName("g_join_num") val joinNum: List<Situation>? = null,
@SerialName("g_mem_num") val memNum: List<Situation>? = null, //人数变化
@SerialName("g_most_act") val mostAct: List<MostActive>? = null, //发言排行
@SerialName("g_sentences") val sentences: List<Situation>? = null,
@SerialName("gc") val gc: Int? = null,
@SerialName("gn") val gn: String? = null,
@SerialName("gowner") val owner: String? = null,
@SerialName("isEnd") val isEnd: Int
)
}
@Serializable
internal data class GroupHonorListData(
@SerialName("gc") val gc: String?,
@SerialName("type") val type: JsonElement,
@SerialName("uin") val uin: String?,
@SerialName("talkativeList") val talkativeList: List<Actor>? = null,
@SerialName("currentTalkative") val currentTalkative: Current? = null,
@SerialName("actorList") val actorList: List<Actor>? = null,
@SerialName("legendList") val legendList: List<Actor>? = null,
@SerialName("newbieList") val newbieList: List<Actor>? = null,
@SerialName("strongnewbieList") val strongNewbieList: List<Actor>? = null,
@SerialName("emotionList") val emotionList: List<Actor>? = null,
@SerialName("richerList") val richerList: List<Actor>? = null,
@SerialName("currentRicher") val currentRicher: Current? = null,
@SerialName("redpacketHonnorList") val redPacketHonorList: List<Actor>? = null,
@SerialName("currentRedpacketHonnor") val currentRedPacketHonor: Current? = null,
@SerialName("levelname") val levelName: Map<String, String>? = null,
@SerialName("manageList") val manageList: List<Tag>? = null, // 管理员
@SerialName("exclusiveList") val exclusiveList: List<Tag>? = null, // 特殊头衔
@SerialName("activeObj") val activeObj: Map<String, List<Tag>>? = null, // Key为活跃等级名, 如`冒泡`
@SerialName("showActiveObj") val showActiveObj: Map<String, Boolean>? = null,
@SerialName("myTitle") val myTitle: String?,
@SerialName("myIndex") val myIndex: Int? = 0,
@SerialName("myAvatar") val myAvatar: String?,
@SerialName("hasServerError") val hasServerError: Boolean?,
@SerialName("hwExcellentList") val hwExcellentList: List<Actor>? = null
) : JsonStruct {
@Serializable
data class Actor(
@SerialName("uin") val uin: Long = 0,
@SerialName("avatar") val avatar: String = "",
@SerialName("name") val name: String = "",
@SerialName("desc") val desc: String = "",
@SerialName("btnText") val btnText: String = "",
@SerialName("text") val text: String = "",
@SerialName("icon") val icon: Int? = null
)
@Serializable
data class Current(
@SerialName("uin") val uin: Long = 0,
@SerialName("day_count") val dayCount: Int = 0,
@SerialName("avatar") val avatar: String = "",
@SerialName("avatar_size") val avatarSize: Int = 0,
@SerialName("nick") val nick: String = ""
)
@Serializable
data class Tag(
@SerialName("uin") val uin: Long = 0,
@SerialName("avatar") val avatar: String = "",
@SerialName("name") val name: String = "",
@SerialName("btnText") val btnText: String = "",
@SerialName("text") val text: String = "",
@SerialName("tag") val tag: String = "", // 头衔
@SerialName("tagColor") val tagColor: String = ""
)
}
@Serializable
internal data class CgiData(
@SerialName("cgicode") val cgicode: Int,
@SerialName("data") val `data`: JsonElement,
@SerialName("msg") override val errorMessage: String,
@SerialName("retcode") override val errorCode: Int
) : CheckableResponseA(), JsonStruct
@Serializable
internal data class MemberMedalData(
@SerialName("avatar") val avatar: String,
@SerialName("face_flag") val faceFlag: Int,
@SerialName("last_view_ts") val lastViewTs: Int,
@SerialName("list") val list: List<Item>, // 头衔详情
@SerialName("nick") val nick: String,
@SerialName("role") val role: Int, // 身份/权限
@SerialName("weared") val weared: String, // 目前显示头衔
@SerialName("weared_color") val wearedColor: String // 头衔颜色
) {
@Serializable
data class Item(
@SerialName("achieve_ts") val achieveTs: Int, // 是否拥有
@SerialName("category_id") val categoryId: Int,
@SerialName("color") val color: String,
@SerialName("is_mystery") val isMystery: Int,
@SerialName("mask") val mask: Int, // 群主 300 管理员 301 特殊 302 活跃 315
@SerialName("medal_desc") val medalDesc: String,
@SerialName("name") val name: String,
@SerialName("order") val order: Int,
@SerialName("pic") val pic: String,
@SerialName("rule") val rule: Int,
@SerialName("rule_desc") val ruleDesc: String, // 来源
@SerialName("wear_ts") val wearTs: Int // 是否佩戴
)
}
@Serializable
internal data class MemberHonorInfo(
@SerialName("add_friend") val addFriend: Int = 0,
@SerialName("avatar") val avatar: String,
@SerialName("avatar_size") val avatarSize: Int,
@SerialName("day_count") val dayCount: Int,
@SerialName("day_count_history") val dayCountHistory: Int = 1,
@SerialName("day_count_max") val dayCountMax: Int = 1,
@SerialName("honor_ids") val honorIds: List<Int> = emptyList(),
@SerialName("nick") val nick: String,
@SerialName("uin") val uin: Long,
@SerialName("update_ymd") val updated: Long = 0, // 格式为 yyyyMMdd 的 数字,表示最后更新时间
)
internal interface MemberHonorList : JsonStruct {
val current: MemberHonorInfo? get() = null
val total: Int
val list: List<MemberHonorInfo>
}
@Serializable
internal data class MemberTalkativeInfo(
@SerialName("current_talkative") val currentTalkative: MemberHonorInfo? = null,
@SerialName("talkative_amount") val talkativeAmount: Int,
@SerialName("talkative_list") val talkativeList: List<MemberHonorInfo>
) : MemberHonorList {
override val current: MemberHonorInfo? get() = currentTalkative
override val total: Int get() = talkativeAmount
override val list: List<MemberHonorInfo> get() = talkativeList
}
@Serializable
internal data class MemberEmotionInfo(
@SerialName("emotion_list") val emotionList: List<MemberHonorInfo>, @SerialName("total") override val total: Int
) : MemberHonorList {
override val list: List<MemberHonorInfo> get() = emotionList
}
@Serializable
internal data class MemberHomeworkExcellentInfo(
@SerialName("hwexcellent_list") val excellentList: List<MemberHonorInfo>,
@SerialName("total") override val total: Int
) : MemberHonorList {
override val list: List<MemberHonorInfo> get() = excellentList
}
@Serializable
internal data class MemberHomeworkActiveInfo(
@SerialName("hwactive_list") val activeList: List<MemberHonorInfo>, @SerialName("total") override val total: Int
) : MemberHonorList {
override val list: List<MemberHonorInfo> get() = activeList
}
@Serializable
internal data class MemberContinuousInfo(
@SerialName("continuous_list") val continuousList: List<MemberHonorInfo>,
@SerialName("total") override val total: Int
) : MemberHonorList {
override val list: List<MemberHonorInfo> get() = continuousList
}
@Serializable
internal data class MemberRicherHonorInfo(
@SerialName("current_richer_honor") val currentRicherHonor: MemberHonorInfo? = null,
@SerialName("richer_amount") val richerAmount: Int,
@SerialName("richer_honor_list") val richerHonorList: List<MemberHonorInfo>
) : MemberHonorList {
override val current: MemberHonorInfo? get() = currentRicherHonor
override val total: Int get() = richerAmount
override val list: List<MemberHonorInfo> get() = richerHonorList
}
@Serializable
internal data class MemberRedPacketInfo(
@SerialName("current_redpacket_honor") val currentRedPacketHonor: MemberHonorInfo? = null,
@SerialName("redpacket_amount") val redPacketAmount: Int,
@SerialName("redpacket_honor_list") val redPacketHonorList: List<MemberHonorInfo>
) : MemberHonorList {
override val current: MemberHonorInfo? get() = currentRedPacketHonor
override val total: Int get() = redPacketAmount
override val list: List<MemberHonorInfo> get() = redPacketHonorList
}
@Serializable
internal data class MemberScoreData(
@SerialName("level_list") val levels: List<Level>,
@SerialName("member_level_list") val mapping: List<MemberLevel>,
@SerialName("member_title_info") val self: MemberScoreInfo,
@SerialName("members_list") val members: List<MemberScoreInfo>,
@SerialName("msg") override val errorMessage: String,
@SerialName("retcode") override val errorCode: Int
) : CheckableResponseA(), JsonStruct {
@Serializable
data class Level(
@SerialName("level") val level: String, @SerialName("name") val name: String
)
@Serializable
data class MemberLevel(
@SerialName("level") val level: Int,
@SerialName("lower_limit") val lowerLimit: Int,
@SerialName("mapping_level") val mappingLevel: Int,
@SerialName("name") val name: String
)
@Serializable
data class MemberScoreInfo(
@SerialName("level_id") val levelId: Int,
@SerialName("nf") val nf: Int = 0,
@SerialName("nick_name") val nickName: String,
@SerialName("role") val role: Int,
@SerialName("score") val score: Int,
@SerialName("uin") val uin: Long
)
}
internal suspend fun QQAndroidBot.getRawGroupLevelInfo(
groupCode: Long
): GroupLevelInfo {
return components[HttpClientProvider].getHttpClient().get {
url("https://qinfo.clt.qq.com/cgi-bin/qun_info/get_group_level_new_info")
parameter("gc", groupCode)
parameter("bkn", client.wLoginSigInfo.bkn)
parameter("src", "qinfo_v3")
headers {
// ktor bug
append(
"cookie", "uin=o${id}; skey=${sKey}"
)
}
}.bodyAsText().loadAs(GroupLevelInfo.serializer())
}
internal suspend fun QQAndroidBot.getRawMemberLevelInfo(
groupCode: Long
): MemberLevelInfo {
return components[HttpClientProvider].getHttpClient().get {
url("https://qinfo.clt.qq.com/cgi-bin/qun_info/get_group_members_lite")
parameter("gc", groupCode)
parameter("bkn", client.wLoginSigInfo.bkn)
parameter("src", "qinfo_v3")
headers {
// ktor bug
append(
"cookie", "uin=o${id}; skey=${sKey}"
)
}
}.bodyAsText().loadAs(MemberLevelInfo.serializer())
}
internal suspend fun QQAndroidBot.getRawMemberMedalInfo(
groupCode: Long, uid: Long
): MemberMedalData {
return components[HttpClientProvider].getHttpClient().get {
url("https://qun.qq.com/cgi-bin/qunwelcome/medal2/list")
parameter("gc", groupCode)
parameter("uin", uid)
parameter("bkn", client.wLoginSigInfo.bkn)
headers {
// ktor bug
append(
"cookie", "uin=o${id}; skey=${sKey}; p_uin=o${id}; p_skey=${psKey(host)};"
)
}
}.bodyAsText()
.loadAs(CgiData.serializer())
.loadData(MemberMedalData.serializer())
}
internal suspend fun QQAndroidBot.getRawTalkativeInfo(
groupCode: Long
): MemberTalkativeInfo {
return components[HttpClientProvider].getHttpClient().get {
url("https://qun.qq.com/cgi-bin/qunapp/honor_talkative")
parameter("gc", groupCode)
parameter("num", 3000)
parameter("bkn", client.wLoginSigInfo.bkn)
headers {
// ktor bug
append(
"cookie", "uin=o${id}; skey=${sKey}; p_uin=o${id}; p_skey=${psKey(host)};"
)
}
}.bodyAsText().loadAs(CgiData.serializer()).loadData(MemberTalkativeInfo.serializer())
}
internal suspend fun QQAndroidBot.getRawEmotionInfo(
groupCode: Long
): MemberEmotionInfo {
return components[HttpClientProvider].getHttpClient().get {
url("https://qun.qq.com/cgi-bin/qunapp/honor_emotion")
parameter("gc", groupCode)
parameter("num", 3000)
parameter("bkn", client.wLoginSigInfo.bkn)
headers {
// ktor bug
append(
"cookie", "uin=o${id}; skey=${sKey}; p_uin=o${id}; p_skey=${psKey(host)};"
)
}
}.bodyAsText().loadAs(CgiData.serializer()).loadData(MemberEmotionInfo.serializer())
}
@PublishedApi
internal val defaultJson: Json = Json {
isLenient = true
ignoreUnknownKeys = true
}
private fun <T> CgiData.loadData(serializer: KSerializer<T>): T =
defaultJson.decodeFromJsonElement(serializer, this.data)
/**
* @param type 取值 1 2 3 分别对应 学术新星 顶尖学霸 至尊学神
*/
internal suspend fun QQAndroidBot.getRawHomeworkExcellentInfo(
groupCode: Long, type: Int
): MemberHomeworkExcellentInfo {
return components[HttpClientProvider].getHttpClient().get {
url("https://qun.qq.com/cgi-bin/qunapp/honor_hwexcellent")
parameter("gc", groupCode)
parameter("req_type", type)
parameter("num", 3000)
parameter("bkn", client.wLoginSigInfo.bkn)
headers {
// ktor bug
append(
"cookie", "uin=o${id}; skey=${sKey}; p_uin=o${id}; p_skey=${psKey(host)};"
)
}
}.bodyAsText().loadAs(CgiData.serializer()).loadData(MemberHomeworkExcellentInfo.serializer())
}
internal suspend fun QQAndroidBot.getRawHomeworkActiveInfo(
groupCode: Long
): MemberHomeworkActiveInfo {
return components[HttpClientProvider].getHttpClient().get {
url("https://qun.qq.com/cgi-bin/qunapp/honor_hwactive")
parameter("gc", groupCode)
parameter("num", 3000)
parameter("bkn", client.wLoginSigInfo.bkn)
headers {
// ktor bug
append(
"cookie", "uin=o${id}; skey=${sKey}; p_uin=o${id}; p_skey=${psKey(host)};"
)
}
}.bodyAsText().loadAs(CgiData.serializer()).loadData(MemberHomeworkActiveInfo.serializer())
}
/**
* @param type 取值 2 3 5 分别对应 群聊之火 群聊炽焰 冒尖小春笋
*/
internal suspend fun QQAndroidBot.getRawContinuousInfo(
groupCode: Long, type: Int
): MemberContinuousInfo {
return components[HttpClientProvider].getHttpClient().get {
url("https://qun.qq.com/cgi-bin/qunapp/honor_continuous")
parameter("gc", groupCode)
parameter("num", 3000)
parameter("continuous_type", type)
parameter("bkn", client.wLoginSigInfo.bkn)
headers {
// ktor bug
append(
"cookie", "uin=o${id}; skey=${sKey}; p_uin=o${id}; p_skey=${psKey(host)};"
)
}
}.bodyAsText().loadAs(CgiData.serializer()).loadData(MemberContinuousInfo.serializer())
}
internal suspend fun QQAndroidBot.getRawRicherHonorInfo(
groupCode: Long
): MemberRicherHonorInfo {
return components[HttpClientProvider].getHttpClient().get {
url("https://qun.qq.com/cgi-bin/new_honor/list_honor/list_richer_honor")
parameter("gc", groupCode)
parameter("num", 3000)
parameter("bkn", client.wLoginSigInfo.bkn)
headers {
// ktor bug
append(
"cookie", "uin=o${id}; skey=${sKey}; p_uin=o${id}; p_skey=${psKey(host)};"
)
}
}.bodyAsText().loadAs(CgiData.serializer()).loadData(MemberRicherHonorInfo.serializer())
}
internal suspend fun QQAndroidBot.getRawRedPacketInfo(
groupCode: Long
): MemberRedPacketInfo {
return components[HttpClientProvider].getHttpClient().get {
url("https://qun.qq.com/cgi-bin/new_honor/list_honor/list_redpacket_honor")
parameter("gc", groupCode)
parameter("num", 3000)
parameter("bkn", client.wLoginSigInfo.bkn)
headers {
// ktor bug
append(
"cookie", "uin=o${id}; skey=${sKey}; p_uin=o${id}; p_skey=${psKey(host)};"
)
}
}.bodyAsText().loadAs(CgiData.serializer()).loadData(MemberRedPacketInfo.serializer())
}
/**
* 只有前 50 名的数据
*/
internal suspend fun QQAndroidBot.getRawMemberTitleList(
groupCode: Long
): MemberScoreData {
return components[HttpClientProvider].getHttpClient().get {
url("https://qun.qq.com/cgi-bin/honorv2/honor_title_list")
parameter("group_code", groupCode)
parameter("request_type", "2")
parameter("bkn", client.wLoginSigInfo.bkn)
headers {
// ktor bug
append(
"cookie", "uin=o${id}; skey=${sKey}; p_uin=o${id}; p_skey=${psKey(host)};"
)
}
}.bodyAsText().loadAs(CgiData.serializer()).loadData(MemberScoreData.serializer())
}
internal suspend fun QQAndroidBot.setGroupLevelInfo(
groupCode: Long, new: Boolean, titles: Map<Int, String>
): SetResult {
return components[HttpClientProvider].getHttpClient().post {
url("https://qinfo.clt.qq.com/cgi-bin/qun_info/set_group_level_info")
setBody(FormDataContent(Parameters.build {
titles.forEach { (index, name) ->
append("lvln$index", name)
}
append("new", if (new) "1" else "0")
append("gc", groupCode.toString())
append("src", "qinfo_v3")
append("bkn", client.wLoginSigInfo.bkn.toString())
}))
headers {
// ktor bug
append(
"cookie", "uin=o${id}; skey=${sKey}"
)
}
}.bodyAsText().loadAs(SetResult.serializer())
}
internal suspend fun QQAndroidBot.setGroupSetting(
groupCode: Long, new: Boolean, show: Boolean
): SetResult {
return components[HttpClientProvider].getHttpClient().post {
url("https://qinfo.clt.qq.com/cgi-bin/qun_info/set_group_setting")
setBody(FormDataContent(Parameters.build {
append(if (new) "levelnewflag" else "levelflag", if (show) "1" else "0")
append("gc", groupCode.toString())
append("src", "qinfo_v3")
append("bkn", client.wLoginSigInfo.bkn.toString())
}))
headers {
// ktor bug
append(
"cookie", "uin=o${id}; skey=${sKey}"
)
}
}.bodyAsText().loadAs(SetResult.serializer())
}
internal suspend fun QQAndroidBot.setGroupHonourFlag(
groupCode: Long, flag: Boolean
): SetResult {
return components[HttpClientProvider].getHttpClient().post {
url("https://qinfo.clt.qq.com/cgi-bin/qun_info/set_honour_flag")
setBody(FormDataContent(Parameters.build {
append("gc", groupCode.toString())
append("bkn", client.wLoginSigInfo.bkn.toString())
append("src", "qinfo_v3")
append("flag", if (flag) "0" else "1")
}))
headers {
// ktor bug
append(
"cookie", "uin=o${id}; skey=${sKey}"
)
}
}.bodyAsText().loadAs(SetResult.serializer())
}
internal suspend fun QQAndroidBot.getRawGroupActiveData(
groupCode: Long, page: Int? = null
): GroupActiveData {
return components[HttpClientProvider].getHttpClient().get {
url("https://qqweb.qq.com/c/activedata/get_mygroup_data")
parameter("bkn", client.wLoginSigInfo.bkn)
parameter("gc", groupCode)
parameter("page", page)
headers {
// ktor bug
append(
"cookie", "uin=o${id}; skey=${sKey}; p_uin=o${id}; p_skey=${psKey(host)};"
)
}
}.bodyAsText().loadAs(GroupActiveData.serializer())
}
internal suspend fun QQAndroidBot.getRawGroupHonorListData(
groupId: Long, type: GroupHonorType
): GroupHonorListData {
val html = components[HttpClientProvider].getHttpClient().get {
url("https://qun.qq.com/interactive/honorlist")
parameter("gc", groupId)
parameter(
"type", when (type) {
GroupHonorType.BRONZE -> "bronze"
GroupHonorType.SILVER -> "silver"
GroupHonorType.GOLDEN -> "golden"
GroupHonorType.WHIRLWIND -> "whirlwind"
else -> type.id
}
)
headers {
// ktor bug
append(
"cookie", "uin=o${id}; skey=${sKey}; p_uin=o${id}; p_skey=${psKey(host)};"
)
}
}.bodyAsText()
val jsonText = html.substringAfter("window.__INITIAL_STATE__=").substringBefore("</script>")
return jsonText.loadAs(GroupHonorListData.serializer())
}
@Suppress("INVISIBLE_MEMBER")
internal fun GroupActiveData.MostActive.toActiveRecord(group: Group): ActiveRecord {
return ActiveRecord(
memberId = uin, memberName = name, periodDays = sentencesNum, messagesCount = sta, member = group.get(id = uin)
)
}
@Suppress("INVISIBLE_MEMBER")
internal fun GroupActiveData.ActiveInfo.toActiveChart(): ActiveChart {
return ActiveChart(
actives = actNum?.associate { it.date to it.num }.orEmpty(),
sentences = sentences?.associate { it.date to it.num }.orEmpty(),
members = memNum?.associate { it.date to it.num }.orEmpty(),
join = joinNum?.associate { it.date to it.num }.orEmpty(),
exit = exitNum?.associate { it.date to it.num }.orEmpty()
)
}
@Suppress("INVISIBLE_MEMBER")
internal fun MemberHonorInfo.toActiveHonorInfo(group: GroupImpl): ActiveHonorInfo {
return ActiveHonorInfo(
memberName = nick,
memberId = uin,
avatar = avatar + avatarSize,
member = group.get(id = uin),
termDays = dayCount,
historyDays = dayCountHistory,
maxTermDays = dayCountMax
)
}

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.contact.info
@ -12,6 +12,7 @@ package net.mamoe.mirai.internal.contact.info
import kotlinx.serialization.Serializable
import net.mamoe.mirai.data.GroupInfo
import net.mamoe.mirai.internal.network.Packet
import net.mamoe.mirai.internal.network.protocol.data.jce.StGroupRankInfo
import net.mamoe.mirai.internal.network.protocol.data.jce.StTroopNum
@Serializable
@ -27,8 +28,13 @@ internal data class GroupInfoImpl(
override val confessTalk: Boolean,
override val muteAll: Boolean,
override val botMuteTimestamp: Int,
override val isHonorVisible: Boolean,
override val isTitleVisible: Boolean,
override val isTemperatureVisible: Boolean,
override val rankTitles: Map<Int, String>,
override val temperatureTitles: Map<Int, String>
) : GroupInfo, Packet, Packet.NoLog {
constructor(stTroopNum: StTroopNum) : this(
constructor(stTroopNum: StTroopNum, stGroupRankInfo: StGroupRankInfo?) : this(
uin = stTroopNum.groupUin,
owner = stTroopNum.dwGroupOwnerUin,
groupCode = stTroopNum.groupCode,
@ -40,5 +46,24 @@ internal data class GroupInfoImpl(
confessTalk = stTroopNum.dwGroupFlagExt3?.and(0x00002000) == 0L,
muteAll = stTroopNum.dwShutUpTimestamp != 0L,
botMuteTimestamp = stTroopNum.dwMyShutUpTimestamp?.toInt() ?: 0,
isHonorVisible = stGroupRankInfo?.groupRankSysFlag?.toInt() == 1,
isTitleVisible = stGroupRankInfo?.groupRankUserFlag?.toInt() == 1,
isTemperatureVisible = stGroupRankInfo?.groupRankUserFlagNew?.toInt() == 1,
rankTitles = buildMap {
for (pair in stGroupRankInfo?.vecRankMap.orEmpty()) {
val level = pair.dwLevel?.toInt() ?: continue
val title = pair.rank.orEmpty()
put(level, title)
}
},
temperatureTitles = buildMap {
for (pair in stGroupRankInfo?.vecRankMapNew.orEmpty()) {
val level = pair.dwLevel?.toInt() ?: continue
val title = pair.rank.orEmpty()
put(level, title)
}
}
)
}

View File

@ -11,9 +11,12 @@ package net.mamoe.mirai.internal.contact.info
import kotlinx.serialization.Serializable
import net.mamoe.mirai.contact.MemberPermission
import net.mamoe.mirai.data.GroupHonorType
import net.mamoe.mirai.data.MemberInfo
import net.mamoe.mirai.internal.network.QQAndroidClient
import net.mamoe.mirai.internal.network.protocol.data.jce.StTroopMemberInfo
import net.mamoe.mirai.internal.network.protocol.packet.login.wtlogin.orEmpty
import net.mamoe.mirai.utils.ConcurrentSet
import net.mamoe.mirai.utils.currentTimeSeconds
@Serializable
@ -29,6 +32,10 @@ internal data class MemberInfoImpl(
override val joinTimestamp: Int = currentTimeSeconds().toInt(),
override var lastSpeakTimestamp: Int = 0,
override val isOfficialBot: Boolean = false,
override var rank: Int = 1,
override var point: Int = 0,
override val honors: MutableSet<GroupHonorType> = ConcurrentSet(),
override var temperature: Int = 1
) : MemberInfo {
constructor(
client: QQAndroidClient,
@ -49,6 +56,43 @@ internal data class MemberInfoImpl(
anonymousId = null,
joinTimestamp = jceInfo.dwJoinTime?.toInt() ?: 0,
lastSpeakTimestamp = jceInfo.dwLastSpeakTime?.toInt() ?: 0,
isOfficialBot = client.groupConfig.isOfficialRobot(jceInfo.memberUin)
isOfficialBot = client.groupConfig.isOfficialRobot(jceInfo.memberUin),
rank = jceInfo.dwMemberLevel?.toInt() ?: 1,
point = jceInfo.dwPoint?.toInt() ?: 0,
honors = ConcurrentSet<GroupHonorType>().apply {
/**
* vecGroupHonor 结构是
* [
* (type, value),
* (type, value),
* (type, value),
* ]
* 构成的 ByteArray
* type = 8 表示群荣誉头衔标志
* type = 16 表示群荣誉活跃度
*/
val bytes = jceInfo.vecGroupHonor.orEmpty()
for (index in bytes.indices step 2) {
val type = bytes[index]
if (type.toInt() == 8) {
val value = bytes.getOrNull(index + 1) ?: break
try {
@Suppress("INVISIBLE_MEMBER")
add(GroupHonorType(value.toInt()))
} catch (_: Exception) {
}
}
}
},
temperature = jceInfo.vecGroupHonor?.let { bytes ->
for (index in bytes.indices step 2) {
val type = bytes[index]
if (type.toInt() == 16) {
val value = bytes.getOrNull(index + 1) ?: break
return@let value.toInt()
}
}
null
} ?: 0
)
}

View File

@ -30,6 +30,7 @@ import net.mamoe.mirai.internal.network.component.ComponentKey
import net.mamoe.mirai.internal.network.component.ComponentStorage
import net.mamoe.mirai.internal.network.isValid
import net.mamoe.mirai.internal.network.notice.NewContactSupport
import net.mamoe.mirai.internal.network.protocol.data.jce.StGroupRankInfo
import net.mamoe.mirai.internal.network.protocol.data.jce.StTroopNum
import net.mamoe.mirai.internal.network.protocol.data.jce.SvcRespRegister
import net.mamoe.mirai.internal.network.protocol.data.jce.isValid
@ -218,7 +219,7 @@ internal class ContactUpdaterImpl(
initFriendOk = true
}
private suspend fun addGroupToBot(stTroopNum: StTroopNum) = stTroopNum.run {
private suspend fun addGroupToBot(stTroopNum: StTroopNum, stGroupRankInfo: StGroupRankInfo?) = stTroopNum.run {
suspend fun refreshGroupMemberList(): Sequence<MemberInfo> {
return Mirai.getRawGroupMemberList(
bot,
@ -249,7 +250,7 @@ internal class ContactUpdaterImpl(
bot = bot,
parentCoroutineContext = bot.coroutineContext,
id = groupCode,
groupInfo = GroupInfoImpl(stTroopNum),
groupInfo = GroupInfoImpl(stTroopNum, stGroupRankInfo),
members = members,
),
)
@ -298,7 +299,9 @@ internal class ContactUpdaterImpl(
troopListData.groups.forEach { group ->
launch {
semaphore.withPermit {
retryCatching(5) { addGroupToBot(group) }.getOrThrow()
retryCatching(5) {
addGroupToBot(group, troopListData.ranks.find { it.dwGroupCode == group.groupCode })
}.getOrThrow()
}
}
}

View File

@ -22,6 +22,7 @@ import net.mamoe.mirai.internal.contact.info.GroupInfoImpl
import net.mamoe.mirai.internal.contact.info.MemberInfoImpl
import net.mamoe.mirai.internal.contact.info.StrangerInfoImpl
import net.mamoe.mirai.internal.getGroupByUin
import net.mamoe.mirai.internal.network.protocol.data.jce.StGroupRankInfo
import net.mamoe.mirai.internal.network.protocol.data.jce.StTroopNum
import net.mamoe.mirai.internal.network.protocol.data.proto.MsgComm
import net.mamoe.mirai.internal.network.protocol.packet.list.FriendList
@ -52,9 +53,9 @@ internal interface NewContactSupport { // can be a marker interface when context
return addNewGroupByCode(Mirai.calculateGroupCodeByGroupUin(groupUin))
}
suspend fun QQAndroidBot.addNewGroup(stTroopNum: StTroopNum): GroupImpl? {
suspend fun QQAndroidBot.addNewGroup(stTroopNum: StTroopNum, stGroupRankInfo: StGroupRankInfo?): GroupImpl? {
if (getGroup(stTroopNum.groupCode) != null) return null
return getNewGroup(stTroopNum)?.apply { groups.delegate.add(this) }
return getNewGroup(stTroopNum, stGroupRankInfo).apply { groups.delegate.add(this) }
}
fun QQAndroidBot.removeStranger(id: Long): StrangerImpl? {
@ -88,20 +89,23 @@ internal interface NewContactSupport { // can be a marker interface when context
}
private suspend fun QQAndroidBot.getNewGroup(groupCode: Long): GroupImpl? {
val troopNum = network.sendAndExpect(
val response = network.sendAndExpect(
FriendList.GetTroopListSimplify(client),
timeout = 10_000, attempts = 5
).groups.firstOrNull { it.groupCode == groupCode } ?: return null
)
return getNewGroup(troopNum)
val troopNum = response.groups.firstOrNull { it.groupCode == groupCode } ?: return null
val groupRankInfo = response.ranks.find { it.dwGroupCode == groupCode }
return getNewGroup(troopNum, groupRankInfo)
}
private suspend fun QQAndroidBot.getNewGroup(troopNum: StTroopNum): GroupImpl? {
private suspend fun QQAndroidBot.getNewGroup(troopNum: StTroopNum, stGroupRankInfo: StGroupRankInfo?): GroupImpl {
return GroupImpl(
bot = this,
parentCoroutineContext = coroutineContext,
id = troopNum.groupCode,
groupInfo = GroupInfoImpl(troopNum),
groupInfo = GroupInfoImpl(troopNum, stGroupRankInfo),
members = Mirai.getRawGroupMemberList(
this,
troopNum.groupUin,

View File

@ -345,7 +345,7 @@ internal class GroupNotificationProcessor(
)
}
// 龙王
10093L, 1053L, 1054L -> {
10093L, 10094L, 1053L, 1054L, 1103L -> {
val now = grayTip.msgTemplParam["uin"]?.findMember() ?: group.botAsMember
val previous = grayTip.msgTemplParam["uin_last"]?.findMember()
@ -361,6 +361,42 @@ internal class GroupNotificationProcessor(
collect(MemberHonorChangeEvent.Achieve(now, GroupHonorType.TALKATIVE))
}
}
// 群聊之火
1052L, 1129L -> {
val now = grayTip.msgTemplParam["uin"]?.findMember() ?: group.botAsMember
now.info.honors += GroupHonorType.PERFORMER
collect(MemberHonorChangeEvent.Achieve(now, GroupHonorType.PERFORMER))
}
// 群聊炽焰
1055L -> {
val now = grayTip.msgTemplParam["uin"]?.findMember() ?: group.botAsMember
now.info.honors -= GroupHonorType.PERFORMER
now.info.honors += GroupHonorType.LEGEND
collect(MemberHonorChangeEvent.Lose(now, GroupHonorType.PERFORMER))
collect(MemberHonorChangeEvent.Achieve(now, GroupHonorType.LEGEND))
}
// 快乐源泉
1067L -> {
val now = grayTip.msgTemplParam["uin"]?.findMember() ?: group.botAsMember
now.info.honors += GroupHonorType.EMOTION
collect(MemberHonorChangeEvent.Achieve(now, GroupHonorType.EMOTION))
}
// 善财福禄寿
10111L -> {
val now = grayTip.msgTemplParam["uin"]?.findMember() ?: group.botAsMember
val previous = grayTip.msgTemplParam["uin_last"]?.findMember()
if (previous == null) {
collect(MemberHonorChangeEvent.Achieve(now, GroupHonorType.RED_PACKET))
} else {
// 善财福禄寿 也是唯一的, 也许要加 新事件
collect(MemberHonorChangeEvent.Lose(previous, GroupHonorType.RED_PACKET))
collect(MemberHonorChangeEvent.Achieve(now, GroupHonorType.RED_PACKET))
}
}
//
else -> {
markNotConsumed()

View File

@ -79,11 +79,12 @@ internal class FriendList {
OutgoingPacketFactory<GetTroopListSimplify.Response>("friendlist.GetTroopListReqV2") {
override suspend fun ByteReadPacket.decode(bot: QQAndroidBot): Response {
val res = this.readUniPacket(GetTroopListRespV2.serializer())
return Response(res.vecTroopList.orEmpty())
return Response(res.vecTroopList.orEmpty(), res.vecTroopRank.orEmpty())
}
class Response(
val groups: List<StTroopNum>
val groups: List<StTroopNum>,
val ranks: List<StGroupRankInfo>
) : Packet {
override fun toString(): String = "FriendList.GetFriendGroupList.Response"
}

View File

@ -105,11 +105,17 @@ internal interface GroupExtensions {
confessTalk: Boolean = false,
muteAll: Boolean = false,
botMuteTimestamp: Int = 0,
honorShow: Boolean = false,
titleShow: Boolean = false,
temperatureShow: Boolean = false,
rankTitles: Map<Int, String> = emptyMap(),
temperatureTitles: Map<Int, String> = emptyMap(),
): GroupInfoImpl =
GroupInfoImpl(
uin, owner, groupCode, memo, name,
allowMemberInvite, allowAnonymousChat, autoApprove, confessTalk, muteAll,
botMuteTimestamp
botMuteTimestamp,
honorShow, titleShow, temperatureShow, rankTitles, temperatureTitles
)
fun Bot.addGroup(group: Group) {

View File

@ -0,0 +1,42 @@
/*
* 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.
*
* https://github.com/mamoe/mirai/blob/dev/LICENSE
*/
package net.mamoe.mirai.internal.contact.active
import kotlinx.coroutines.runBlocking
import net.mamoe.mirai.contact.active.ActiveRecord
import net.mamoe.mirai.data.GroupInfo
import net.mamoe.mirai.internal.contact.GroupImpl
import net.mamoe.mirai.utils.JavaFriendlyAPI
import net.mamoe.mirai.utils.MiraiLogger
import net.mamoe.mirai.utils.stream
import java.util.stream.Stream
internal actual class GroupActiveImpl actual constructor(
group: GroupImpl,
logger: MiraiLogger,
groupInfo: GroupInfo,
) : CommonGroupActiveImpl(group, logger, groupInfo) {
@JavaFriendlyAPI
override fun asStream(): Stream<ActiveRecord> {
return stream {
var page = 0
while (true) {
val result = runBlocking { getGroupActiveData(page = page) }
val most = result.info.mostAct ?: break
for (active in most) yield(active.toActiveRecord(group))
if (result.info.isEnd == 1) break
page++
}
}
}
}

View File

@ -0,0 +1,20 @@
/*
* 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.
*
* https://github.com/mamoe/mirai/blob/dev/LICENSE
*/
package net.mamoe.mirai.internal.contact.active
import net.mamoe.mirai.data.GroupInfo
import net.mamoe.mirai.internal.contact.GroupImpl
import net.mamoe.mirai.utils.MiraiLogger
internal actual class GroupActiveImpl actual constructor(
group: GroupImpl,
logger: MiraiLogger,
groupInfo: GroupInfo,
) : CommonGroupActiveImpl(group, logger, groupInfo)