JsBot

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val uid: String
Link copied to clipboard
val uin: Long

Functions

Link copied to clipboard
fun createGroupFolder(groupUin: Long, folderName: String): Promise<String>
Link copied to clipboard
fun deleteFriend(friendUin: Long, block: Boolean = false): Promise<Unit>
Link copied to clipboard
fun deleteGroupAnnouncement(groupUin: Long, announcementId: String): Promise<Unit>
Link copied to clipboard
fun deleteGroupFile(groupUin: Long, fileId: String): Promise<Unit>
Link copied to clipboard
fun deleteGroupFolder(groupUin: Long, folderId: String): Promise<Unit>
Link copied to clipboard
fun fetchFriends(): Promise<Array<BotFriendData>>
Link copied to clipboard
fun fetchGroupMembers(groupUin: Long): Promise<Array<BotGroupMemberData>>
Link copied to clipboard
fun fetchGroups(): Promise<Array<BotGroupData>>
Link copied to clipboard
fun fetchUserInfoByUid(uid: String): Promise<BotUserInfo>
Link copied to clipboard
fun fetchUserInfoByUin(uin: Long): Promise<BotUserInfo>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun getDownloadUrl(resourceId: String): Promise<String>
Link copied to clipboard
fun getForwardedMessages(resId: String): Promise<Array<BotForwardedMessage>>
Link copied to clipboard
fun getFriend(uin: Long, forceUpdate: Boolean = false): Promise<BotFriend?>
Link copied to clipboard
fun getFriendHistoryMessages(friendUin: Long, limit: Int, startSequence: Long? = null): Promise<BotHistoryMessages>
Link copied to clipboard
fun getFriendRequests(isFiltered: Boolean = false, limit: Int = 20): Promise<Array<BotFriendRequest>>
Link copied to clipboard
fun getFriends(forceUpdate: Boolean = false): Promise<Array<BotFriend>>
Link copied to clipboard
fun getGroup(uin: Long, forceUpdate: Boolean = false): Promise<BotGroup?>
Link copied to clipboard
fun getGroupAnnouncements(groupUin: Long): Promise<Array<BotGroupAnnouncement>>
Link copied to clipboard
fun getGroupEssenceMessages(groupUin: Long, pageIndex: Int, pageSize: Int): Promise<BotEssenceMessageResult>
Link copied to clipboard
Link copied to clipboard
fun getGroupFileList(groupUin: Long, targetDirectory: String = "/", startIndex: Int = 0): Promise<BotGroupFileSystemList>
Link copied to clipboard
fun getGroupHistoryMessages(groupUin: Long, limit: Int, startSequence: Long? = null): Promise<BotHistoryMessages>
Link copied to clipboard
fun getGroupMember(groupUin: Long, memberUin: Long, forceUpdate: Boolean = false): Promise<BotGroupMember?>
Link copied to clipboard
fun getGroupMembers(groupUin: Long, forceUpdate: Boolean = false): Promise<Array<BotGroupMember>?>
Link copied to clipboard
fun getGroupNotifications(startSequence: Long? = null, isFiltered: Boolean = false, count: Int = 20): Promise<JsGroupNotifications>
Link copied to clipboard
fun getGroups(forceUpdate: Boolean = false): Promise<Array<BotGroup>>
Link copied to clipboard
fun getPins(): Promise<BotPinnedChats>
Link copied to clipboard
fun getPrivateFileDownloadUrl(friendUin: Long, fileId: String, fileHash: String): Promise<String>
Link copied to clipboard
fun getPSKey(domain: String): Promise<String>
Link copied to clipboard
Link copied to clipboard
fun getUidByUin(uin: Long, mayComeFromGroupUin: Long? = null): Promise<String>
Link copied to clipboard
Link copied to clipboard
fun kickGroupMember(groupUin: Long, memberUin: Long, rejectAddRequest: Boolean = false, reason: String = ""): Promise<Unit>
Link copied to clipboard
fun login(queryInterval: Long = 3000, preloadContacts: Boolean = false): Promise<Unit>
Link copied to clipboard
fun markFriendMessagesAsRead(friendUin: Long, startSequence: Long, startTime: Long): Promise<Unit>
Link copied to clipboard
fun markGroupMessagesAsRead(groupUin: Long, startSequence: Long): Promise<Unit>
Link copied to clipboard
fun moveGroupFile(groupUin: Long, fileId: String, parentFolderId: String, targetFolderId: String): Promise<Unit>
Link copied to clipboard
fun offBotOffline(callback: (BotOfflineEvent) -> dynamic): Boolean
Link copied to clipboard
fun offFriendFileUpload(callback: (FriendFileUploadEvent) -> dynamic): Boolean
Link copied to clipboard
fun offFriendNudge(callback: (FriendNudgeEvent) -> dynamic): Boolean
Link copied to clipboard
fun offFriendRequest(callback: (FriendRequestEvent) -> dynamic): Boolean
Link copied to clipboard
fun offGroupAdminChange(callback: (GroupAdminChangeEvent) -> dynamic): Boolean
Link copied to clipboard
fun offGroupEssenceMessageChange(callback: (GroupEssenceMessageChangeEvent) -> dynamic): Boolean
Link copied to clipboard
fun offGroupFileUpload(callback: (GroupFileUploadEvent) -> dynamic): Boolean
Link copied to clipboard
fun offGroupInvitation(callback: (GroupInvitationEvent) -> dynamic): Boolean
Link copied to clipboard
fun offGroupInvitedJoinRequest(callback: (GroupInvitedJoinRequestEvent) -> dynamic): Boolean
Link copied to clipboard
fun offGroupJoinRequest(callback: (GroupJoinRequestEvent) -> dynamic): Boolean
Link copied to clipboard
fun offGroupMemberDecrease(callback: (GroupMemberDecreaseEvent) -> dynamic): Boolean
Link copied to clipboard
fun offGroupMemberIncrease(callback: (GroupMemberIncreaseEvent) -> dynamic): Boolean
Link copied to clipboard
fun offGroupMessageReaction(callback: (GroupMessageReactionEvent) -> dynamic): Boolean
Link copied to clipboard
fun offGroupMute(callback: (GroupMuteEvent) -> dynamic): Boolean
Link copied to clipboard
fun offGroupNameChange(callback: (GroupNameChangeEvent) -> dynamic): Boolean
Link copied to clipboard
fun offGroupNudge(callback: (GroupNudgeEvent) -> dynamic): Boolean
Link copied to clipboard
fun offGroupWholeMute(callback: (GroupWholeMuteEvent) -> dynamic): Boolean
Link copied to clipboard
Link copied to clipboard
fun offMessageRecall(callback: (MessageRecallEvent) -> dynamic): Boolean
Link copied to clipboard
fun offMessageReceive(callback: (MessageReceiveEvent) -> dynamic): Boolean
Link copied to clipboard
fun offPinChanged(callback: (PinChangedEvent) -> dynamic): Boolean
Link copied to clipboard
fun offQRCodeGenerated(callback: (QRCodeGeneratedEvent) -> dynamic): Boolean
Link copied to clipboard
fun offQRCodeStateQuery(callback: (QRCodeStateQueryEvent) -> dynamic): Boolean
Link copied to clipboard
fun offSessionStoreUpdated(callback: (SessionStoreUpdatedEvent) -> dynamic): Boolean
Link copied to clipboard
fun onBotOffline(callback: (BotOfflineEvent) -> dynamic)
Link copied to clipboard
fun onFriendFileUpload(callback: (FriendFileUploadEvent) -> dynamic)
Link copied to clipboard
fun onFriendNudge(callback: (FriendNudgeEvent) -> dynamic)
Link copied to clipboard
fun onFriendRequest(callback: (FriendRequestEvent) -> dynamic)
Link copied to clipboard
fun onGroupAdminChange(callback: (GroupAdminChangeEvent) -> dynamic)
Link copied to clipboard
fun onGroupEssenceMessageChange(callback: (GroupEssenceMessageChangeEvent) -> dynamic)
Link copied to clipboard
fun onGroupFileUpload(callback: (GroupFileUploadEvent) -> dynamic)
Link copied to clipboard
fun onGroupInvitation(callback: (GroupInvitationEvent) -> dynamic)
Link copied to clipboard
fun onGroupInvitedJoinRequest(callback: (GroupInvitedJoinRequestEvent) -> dynamic)
Link copied to clipboard
fun onGroupJoinRequest(callback: (GroupJoinRequestEvent) -> dynamic)
Link copied to clipboard
fun onGroupMemberDecrease(callback: (GroupMemberDecreaseEvent) -> dynamic)
Link copied to clipboard
fun onGroupMemberIncrease(callback: (GroupMemberIncreaseEvent) -> dynamic)
Link copied to clipboard
fun onGroupMessageReaction(callback: (GroupMessageReactionEvent) -> dynamic)
Link copied to clipboard
fun onGroupMute(callback: (GroupMuteEvent) -> dynamic)
Link copied to clipboard
fun onGroupNameChange(callback: (GroupNameChangeEvent) -> dynamic)
Link copied to clipboard
fun onGroupNudge(callback: (GroupNudgeEvent) -> dynamic)
Link copied to clipboard
fun onGroupWholeMute(callback: (GroupWholeMuteEvent) -> dynamic)
Link copied to clipboard
fun online(preloadContacts: Boolean = false): Promise<Unit>
Link copied to clipboard
fun onMessageRecall(callback: (MessageRecallEvent) -> dynamic)
Link copied to clipboard
fun onMessageReceive(callback: (MessageReceiveEvent) -> dynamic)
Link copied to clipboard
fun onPinChanged(callback: (PinChangedEvent) -> dynamic)
Link copied to clipboard
fun onQRCodeGenerated(callback: (QRCodeGeneratedEvent) -> dynamic)
Link copied to clipboard
fun onQRCodeStateQuery(callback: (QRCodeStateQueryEvent) -> dynamic)
Link copied to clipboard
fun onSessionStoreUpdated(callback: (SessionStoreUpdatedEvent) -> dynamic)
Link copied to clipboard
fun qrCodeLogin(queryInterval: Long = 3000, preloadContacts: Boolean = false): Promise<Unit>
Link copied to clipboard
fun quitGroup(groupUin: Long): Promise<Unit>
Link copied to clipboard
fun recallFriendMessage(friendUin: Long, sequence: Long): Promise<Unit>
Link copied to clipboard
fun recallGroupMessage(groupUin: Long, sequence: Long): Promise<Unit>
Link copied to clipboard
fun renameGroupFile(groupUin: Long, fileId: String, parentFolderId: String, newFileName: String): Promise<Unit>
Link copied to clipboard
fun renameGroupFolder(groupUin: Long, folderId: String, newFolderName: String): Promise<Unit>
Link copied to clipboard
fun sendFriendMessage(friendUin: Long, build: (JsBotOutgoingMessageBuilder) -> Promise<Unit>): Promise<BotOutgoingMessageResult>
Link copied to clipboard
fun sendFriendMessageRich(friendUin: Long, clientSequence: Long, random: Int, build: (JsBotOutgoingMessageBuilder) -> Promise<Unit>): Promise<BotOutgoingMessageResult>
Link copied to clipboard
fun sendFriendNudge(friendUin: Long, isSelf: Boolean = false): Promise<Unit>
Link copied to clipboard
fun sendGroupAnnouncement(groupUin: Long, content: String, imageUrl: String? = null, showEditCard: Boolean = false, showTipWindow: Boolean = true, confirmRequired: Boolean = true, isPinned: Boolean = false): Promise<String>
Link copied to clipboard
fun sendGroupMessage(groupUin: Long, build: (JsBotOutgoingMessageBuilder) -> Promise<Unit>): Promise<BotOutgoingMessageResult>
Link copied to clipboard
fun sendGroupMessageRich(groupUin: Long, clientSequence: Long, random: Int, build: (JsBotOutgoingMessageBuilder) -> Promise<Unit>): Promise<BotOutgoingMessageResult>
Link copied to clipboard
fun sendGroupNudge(groupUin: Long, targetUin: Long): Promise<Unit>
Link copied to clipboard
fun sendProfileLike(friendUin: Long, count: Int = 1): Promise<Unit>
Link copied to clipboard
fun setAvatar(imageData: ByteArray): Promise<Unit>
Link copied to clipboard
Link copied to clipboard
fun setFriendPin(friendUin: Long, isPinned: Boolean): Promise<Unit>
Link copied to clipboard
fun setFriendRequest(initiatorUid: String, accept: Boolean, isFiltered: Boolean = false): Promise<Unit>
Link copied to clipboard
fun setGroupAvatar(groupUin: Long, imageData: ByteArray): Promise<Unit>
Link copied to clipboard
fun setGroupEssenceMessage(groupUin: Long, sequence: Long, isSet: Boolean): Promise<Unit>
Link copied to clipboard
fun setGroupInvitation(groupUin: Long, invitationSeq: Long, accept: Boolean): Promise<Unit>
Link copied to clipboard
fun setGroupMemberAdmin(groupUin: Long, memberUin: Long, isAdmin: Boolean): Promise<Unit>
Link copied to clipboard
fun setGroupMemberCard(groupUin: Long, memberUin: Long, card: String): Promise<Unit>
Link copied to clipboard
fun setGroupMemberMute(groupUin: Long, memberUin: Long, duration: Int): Promise<Unit>
Link copied to clipboard
fun setGroupMemberSpecialTitle(groupUin: Long, memberUin: Long, specialTitle: String): Promise<Unit>
Link copied to clipboard
fun setGroupMessageReaction(groupUin: Long, sequence: Long, code: String, isAdd: Boolean = true): Promise<Unit>
Link copied to clipboard
fun setGroupName(groupUin: Long, groupName: String): Promise<Unit>
Link copied to clipboard
fun setGroupPin(groupUin: Long, isPinned: Boolean): Promise<Unit>
Link copied to clipboard
fun setGroupRequest(groupUin: Long, sequence: Long, eventType: Int, accept: Boolean, isFiltered: Boolean = false, reason: String = ""): Promise<Unit>
Link copied to clipboard
fun setGroupWholeMute(groupUin: Long, isMute: Boolean): Promise<Unit>
Link copied to clipboard
fun setNickname(nickname: String): Promise<Unit>
Link copied to clipboard
fun unsafeSendPacket(cmd: String, payload: ByteArray, timeoutMillis: Long = 10000): Promise<SsoResponse>
Link copied to clipboard
fun uploadGroupFile(groupUin: Long, fileName: String, fileData: ByteArray, parentFolderId: String = "/"): Promise<String>
Link copied to clipboard
fun uploadPrivateFile(friendUin: Long, fileName: String, fileData: ByteArray): Promise<String>