@alemonjs/kook
Advanced tools
+21
| The MIT License (MIT) | ||
| Copyright (c) 2013-present, Yuxi (Evan) You | ||
| Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| of this software and associated documentation files (the "Software"), to deal | ||
| in the Software without restriction, including without limitation the rights | ||
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| copies of the Software, and to permit persons to whom the Software is | ||
| furnished to do so, subject to the following conditions: | ||
| The above copyright notice and this permission notice shall be included in | ||
| all copies or substantial portions of the Software. | ||
| THE SOFTWARE IS PROVIdED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
| THE SOFTWARE. |
+1
-1
@@ -9,2 +9,2 @@ export declare const platform = "kook"; | ||
| export declare const getKOOKConfig: () => Options; | ||
| export declare const getMaster: (UserId: string) => readonly [boolean, string]; | ||
| export declare const getMaster: (UserId: string) => readonly [any, string]; |
+6
-3
@@ -9,5 +9,8 @@ import { getConfigValue, useUserHashKey } from 'alemonjs'; | ||
| const getMaster = (UserId) => { | ||
| const values = getConfigValue() || {}; | ||
| const mainMasterKey = values.master_key || []; | ||
| const mainMasterId = values.master_id || []; | ||
| const config = getKOOKConfig(); | ||
| const master_key = config.master_key || []; | ||
| const master_id = config.master_id || []; | ||
| const masterKey = config.master_key || []; | ||
| const masterId = config.master_id || []; | ||
| const UserKey = useUserHashKey({ | ||
@@ -17,3 +20,3 @@ Platform: platform, | ||
| }); | ||
| const is = master_key.includes(UserKey) || master_id.includes(UserId); | ||
| const is = mainMasterKey.includes(UserKey) || mainMasterId.includes(UserId) || masterKey.includes(UserKey) || masterId.includes(UserId); | ||
| return [is, UserKey]; | ||
@@ -20,0 +23,0 @@ }; |
@@ -13,3 +13,5 @@ class BaseConfig { | ||
| has(key) { | ||
| if (Object.prototype.hasOwnProperty.call(this.#data, key)) ; | ||
| if (Object.prototype.hasOwnProperty.call(this.#data, key)) { | ||
| return true; | ||
| } | ||
| return false; | ||
@@ -16,0 +18,0 @@ } |
+270
-0
@@ -613,2 +613,272 @@ import { definePlatform, cbpPlatform, createResult, ResultCode } from 'alemonjs'; | ||
| } | ||
| else if (data.action === 'me.info') { | ||
| const res = await client | ||
| .userMe() | ||
| .then(r => { | ||
| const d = r?.data ?? r; | ||
| const [isMaster, UserKey] = getMaster(String(d?.id)); | ||
| return createResult(ResultCode.Ok, data.action, { | ||
| UserId: String(d?.id), | ||
| UserName: d?.username, | ||
| UserAvatar: d?.avatar ?? '', | ||
| IsBot: true, | ||
| IsMaster: isMaster, | ||
| UserKey | ||
| }); | ||
| }) | ||
| .catch(err => createResult(ResultCode.Fail, data.action, err)); | ||
| consume([res]); | ||
| } | ||
| else if (data.action === 'message.delete') { | ||
| const messageId = data.payload.MessageId; | ||
| const res = await client | ||
| .messageDelete(messageId) | ||
| .then(r => createResult(ResultCode.Ok, data.action, r)) | ||
| .catch(err => createResult(ResultCode.Fail, data.action, err)); | ||
| consume([res]); | ||
| } | ||
| else if (data.action === 'message.edit') { | ||
| const messageId = data.payload.MessageId; | ||
| const format = data.payload.params?.format; | ||
| const content = format?.map(i => i.value).join('') ?? ''; | ||
| const res = await client | ||
| .messageUpdate({ msg_id: messageId, content }) | ||
| .then(r => createResult(ResultCode.Ok, data.action, r)) | ||
| .catch(err => createResult(ResultCode.Fail, data.action, err)); | ||
| consume([res]); | ||
| } | ||
| else if (data.action === 'reaction.add') { | ||
| const res = await client | ||
| .messageAddReaction({ msg_id: data.payload.MessageId, emoji: data.payload.EmojiId }) | ||
| .then(r => createResult(ResultCode.Ok, data.action, r)) | ||
| .catch(err => createResult(ResultCode.Fail, data.action, err)); | ||
| consume([res]); | ||
| } | ||
| else if (data.action === 'reaction.remove') { | ||
| const res = await client | ||
| .messageDeleteReaction({ msg_id: data.payload.MessageId, emoji: data.payload.EmojiId, user_id: '' }) | ||
| .then(r => createResult(ResultCode.Ok, data.action, r)) | ||
| .catch(err => createResult(ResultCode.Fail, data.action, err)); | ||
| consume([res]); | ||
| } | ||
| else if (data.action === 'member.info') { | ||
| const guildId = data.payload.params?.guildId ?? data.payload.GuildId; | ||
| const userId = data.payload.params?.userId ?? data.payload.UserId; | ||
| const res = await client | ||
| .userView(guildId, userId) | ||
| .then(r => createResult(ResultCode.Ok, data.action, r?.data ?? r)) | ||
| .catch(err => createResult(ResultCode.Fail, data.action, err)); | ||
| consume([res]); | ||
| } | ||
| else if (data.action === 'member.list') { | ||
| const guildId = data.payload.GuildId; | ||
| const res = await client | ||
| .guildUserList(guildId) | ||
| .then(r => createResult(ResultCode.Ok, data.action, r?.data ?? r)) | ||
| .catch(err => createResult(ResultCode.Fail, data.action, err)); | ||
| consume([res]); | ||
| } | ||
| else if (data.action === 'member.kick') { | ||
| const res = await client | ||
| .guildKickout(data.payload.GuildId, data.payload.UserId) | ||
| .then(r => createResult(ResultCode.Ok, data.action, r)) | ||
| .catch(err => createResult(ResultCode.Fail, data.action, err)); | ||
| consume([res]); | ||
| } | ||
| else if (data.action === 'member.ban') { | ||
| const res = await client | ||
| .blacklistCreate({ guild_id: data.payload.GuildId, target_id: data.payload.UserId, remark: data.payload.params?.reason }) | ||
| .then(r => createResult(ResultCode.Ok, data.action, r)) | ||
| .catch(err => createResult(ResultCode.Fail, data.action, err)); | ||
| consume([res]); | ||
| } | ||
| else if (data.action === 'member.unban') { | ||
| const res = await client | ||
| .blacklistDelete({ guild_id: data.payload.GuildId, target_id: data.payload.UserId }) | ||
| .then(r => createResult(ResultCode.Ok, data.action, r)) | ||
| .catch(err => createResult(ResultCode.Fail, data.action, err)); | ||
| consume([res]); | ||
| } | ||
| else if (data.action === 'member.mute') { | ||
| const duration = data.payload.params?.duration ?? 0; | ||
| if (duration > 0) { | ||
| const res = await client | ||
| .guildMuteCreate(data.payload.GuildId, data.payload.UserId, 1) | ||
| .then(r => createResult(ResultCode.Ok, data.action, r)) | ||
| .catch(err => createResult(ResultCode.Fail, data.action, err)); | ||
| consume([res]); | ||
| } | ||
| else { | ||
| const res = await client | ||
| .guildMuteDelete(data.payload.GuildId, data.payload.UserId, 1) | ||
| .then(r => createResult(ResultCode.Ok, data.action, r)) | ||
| .catch(err => createResult(ResultCode.Fail, data.action, err)); | ||
| consume([res]); | ||
| } | ||
| } | ||
| else if (data.action === 'member.card') { | ||
| const res = await client | ||
| .guildNickname(data.payload.GuildId, data.payload.params?.card ?? '', data.payload.UserId) | ||
| .then(r => createResult(ResultCode.Ok, data.action, r)) | ||
| .catch(err => createResult(ResultCode.Fail, data.action, err)); | ||
| consume([res]); | ||
| } | ||
| else if (data.action === 'guild.info') { | ||
| const res = await client | ||
| .guildView(data.payload.GuildId) | ||
| .then(r => createResult(ResultCode.Ok, data.action, r?.data ?? r)) | ||
| .catch(err => createResult(ResultCode.Fail, data.action, err)); | ||
| consume([res]); | ||
| } | ||
| else if (data.action === 'guild.list') { | ||
| const res = await client | ||
| .guildList() | ||
| .then(r => createResult(ResultCode.Ok, data.action, r?.data ?? r)) | ||
| .catch(err => createResult(ResultCode.Fail, data.action, err)); | ||
| consume([res]); | ||
| } | ||
| else if (data.action === 'me.guilds') { | ||
| const res = await client | ||
| .guildList() | ||
| .then(r => createResult(ResultCode.Ok, data.action, r?.data ?? r)) | ||
| .catch(err => createResult(ResultCode.Fail, data.action, err)); | ||
| consume([res]); | ||
| } | ||
| else if (data.action === 'channel.info') { | ||
| const res = await client | ||
| .channelView(data.payload.ChannelId) | ||
| .then(r => createResult(ResultCode.Ok, data.action, r?.data ?? r)) | ||
| .catch(err => createResult(ResultCode.Fail, data.action, err)); | ||
| consume([res]); | ||
| } | ||
| else if (data.action === 'channel.list') { | ||
| const res = await client | ||
| .channelList(data.payload.GuildId) | ||
| .then(r => createResult(ResultCode.Ok, data.action, r?.data ?? r)) | ||
| .catch(err => createResult(ResultCode.Fail, data.action, err)); | ||
| consume([res]); | ||
| } | ||
| else if (data.action === 'channel.create') { | ||
| const params = data.payload.params; | ||
| const res = await client | ||
| .channelCreate({ guild_id: data.payload.GuildId, name: params.name, type: params.type ? Number(params.type) : 1, parent_id: params.parentId }) | ||
| .then(r => createResult(ResultCode.Ok, data.action, r?.data ?? r)) | ||
| .catch(err => createResult(ResultCode.Fail, data.action, err)); | ||
| consume([res]); | ||
| } | ||
| else if (data.action === 'channel.update') { | ||
| const params = data.payload.params; | ||
| const res = await client | ||
| .channelUpdate({ channel_id: data.payload.ChannelId, name: params.name, topic: params.topic }) | ||
| .then(r => createResult(ResultCode.Ok, data.action, r?.data ?? r)) | ||
| .catch(err => createResult(ResultCode.Fail, data.action, err)); | ||
| consume([res]); | ||
| } | ||
| else if (data.action === 'channel.delete') { | ||
| const res = await client | ||
| .channelDelete(data.payload.ChannelId) | ||
| .then(r => createResult(ResultCode.Ok, data.action, r)) | ||
| .catch(err => createResult(ResultCode.Fail, data.action, err)); | ||
| consume([res]); | ||
| } | ||
| else if (data.action === 'role.list') { | ||
| const res = await client | ||
| .guildRoleList(data.payload.GuildId) | ||
| .then(r => createResult(ResultCode.Ok, data.action, r?.data ?? r)) | ||
| .catch(err => createResult(ResultCode.Fail, data.action, err)); | ||
| consume([res]); | ||
| } | ||
| else if (data.action === 'role.create') { | ||
| const params = data.payload.params; | ||
| const res = await client | ||
| .guildRoleCreate({ guild_id: data.payload.GuildId, name: params.name }) | ||
| .then(r => createResult(ResultCode.Ok, data.action, r?.data ?? r)) | ||
| .catch(err => createResult(ResultCode.Fail, data.action, err)); | ||
| consume([res]); | ||
| } | ||
| else if (data.action === 'role.update') { | ||
| const params = data.payload.params; | ||
| const res = await client | ||
| .guildRoleUpdate({ guild_id: data.payload.GuildId, role_id: Number(data.payload.RoleId), name: params.name, color: params.color }) | ||
| .then(r => createResult(ResultCode.Ok, data.action, r?.data ?? r)) | ||
| .catch(err => createResult(ResultCode.Fail, data.action, err)); | ||
| consume([res]); | ||
| } | ||
| else if (data.action === 'role.delete') { | ||
| const res = await client | ||
| .guildRoleDelete({ guild_id: data.payload.GuildId, role_id: Number(data.payload.RoleId) }) | ||
| .then(r => createResult(ResultCode.Ok, data.action, r)) | ||
| .catch(err => createResult(ResultCode.Fail, data.action, err)); | ||
| consume([res]); | ||
| } | ||
| else if (data.action === 'role.assign') { | ||
| const res = await client | ||
| .guildRoleGrant({ guild_id: data.payload.GuildId, user_id: data.payload.UserId, role_id: Number(data.payload.RoleId) }) | ||
| .then(r => createResult(ResultCode.Ok, data.action, r)) | ||
| .catch(err => createResult(ResultCode.Fail, data.action, err)); | ||
| consume([res]); | ||
| } | ||
| else if (data.action === 'role.remove') { | ||
| const res = await client | ||
| .guildRoleRevoke({ guild_id: data.payload.GuildId, user_id: data.payload.UserId, role_id: Number(data.payload.RoleId) }) | ||
| .then(r => createResult(ResultCode.Ok, data.action, r)) | ||
| .catch(err => createResult(ResultCode.Fail, data.action, err)); | ||
| consume([res]); | ||
| } | ||
| else if (data.action === 'message.get') { | ||
| const res = await client | ||
| .messageView(data.payload.MessageId) | ||
| .then(r => createResult(ResultCode.Ok, data.action, r?.data ?? r)) | ||
| .catch(err => createResult(ResultCode.Fail, data.action, err)); | ||
| consume([res]); | ||
| } | ||
| else if (data.action === 'guild.leave') { | ||
| const res = await client | ||
| .guildLeave(data.payload.GuildId) | ||
| .then(r => createResult(ResultCode.Ok, data.action, r)) | ||
| .catch(err => createResult(ResultCode.Fail, data.action, err)); | ||
| consume([res]); | ||
| } | ||
| else if (data.action === 'user.info') { | ||
| const res = await client | ||
| .userView(data.payload.GuildId ?? '', data.payload.UserId) | ||
| .then(r => createResult(ResultCode.Ok, data.action, r?.data ?? r)) | ||
| .catch(err => createResult(ResultCode.Fail, data.action, err)); | ||
| consume([res]); | ||
| } | ||
| else if (data.action === 'media.upload') { | ||
| const params = data.payload.params; | ||
| const fileData = params?.url ?? params?.data; | ||
| if (!fileData) { | ||
| consume([createResult(ResultCode.FailParams, 'Missing url or data', null)]); | ||
| } | ||
| else { | ||
| const res = await client | ||
| .postImage(fileData, params?.name) | ||
| .then(r => createResult(ResultCode.Ok, data.action, r)) | ||
| .catch(err => createResult(ResultCode.Fail, data.action, err)); | ||
| consume([res]); | ||
| } | ||
| } | ||
| else if (data.action === 'history.list') { | ||
| const res = await client | ||
| .messageList(data.payload.ChannelId, { page_size: data.payload.params?.limit }) | ||
| .then(r => createResult(ResultCode.Ok, data.action, r?.data ?? r)) | ||
| .catch(err => createResult(ResultCode.Fail, data.action, err)); | ||
| consume([res]); | ||
| } | ||
| else if (data.action === 'reaction.list') { | ||
| const res = await client | ||
| .messageReactionList({ msg_id: data.payload.MessageId, emoji: data.payload.EmojiId }) | ||
| .then(r => createResult(ResultCode.Ok, data.action, r?.data ?? r)) | ||
| .catch(err => createResult(ResultCode.Fail, data.action, err)); | ||
| consume([res]); | ||
| } | ||
| else if (data.action === 'member.search') { | ||
| const res = await client | ||
| .guildUserList(data.payload.GuildId, { search: data.payload.params?.keyword, page_size: data.payload.params?.limit }) | ||
| .then(r => createResult(ResultCode.Ok, data.action, r?.data ?? r)) | ||
| .catch(err => createResult(ResultCode.Fail, data.action, err)); | ||
| consume([res]); | ||
| } | ||
| else { | ||
@@ -615,0 +885,0 @@ consume([createResult(ResultCode.Fail, '未知请求,请尝试升级版本', null)]); |
+78
-0
@@ -82,2 +82,8 @@ import { type AxiosRequestConfig } from 'axios'; | ||
| }>; | ||
| messageList(target_id: string, params?: { | ||
| msg_id?: string; | ||
| pin?: number; | ||
| flag?: string; | ||
| page_size?: number; | ||
| }): Promise<any>; | ||
| messageAddReaction(data: { | ||
@@ -161,2 +167,74 @@ msg_id: string; | ||
| }>; | ||
| guildList(): Promise<any>; | ||
| guildView(guild_id: string): Promise<any>; | ||
| guildUserList(guild_id: string, params?: { | ||
| channel_id?: string; | ||
| search?: string; | ||
| role_id?: number; | ||
| mobile_verified?: number; | ||
| active_time?: number; | ||
| joined_at?: number; | ||
| page?: number; | ||
| page_size?: number; | ||
| }): Promise<any>; | ||
| guildLeave(guild_id: string): Promise<any>; | ||
| guildNickname(guild_id: string, nickname: string, user_id?: string): Promise<any>; | ||
| guildMuteCreate(guild_id: string, user_id: string, type: 1 | 2): Promise<any>; | ||
| guildMuteDelete(guild_id: string, user_id: string, type: 1 | 2): Promise<any>; | ||
| messageView(msg_id: string): Promise<any>; | ||
| channelList(guild_id: string): Promise<any>; | ||
| channelView(channel_id: string): Promise<any>; | ||
| channelCreate(data: { | ||
| guild_id: string; | ||
| name: string; | ||
| type?: number; | ||
| parent_id?: string; | ||
| limit_amount?: number; | ||
| voice_quality?: string; | ||
| }): Promise<any>; | ||
| channelUpdate(data: { | ||
| channel_id: string; | ||
| name?: string; | ||
| topic?: string; | ||
| slow_mode?: number; | ||
| }): Promise<any>; | ||
| channelDelete(channel_id: string): Promise<any>; | ||
| guildRoleList(guild_id: string): Promise<any>; | ||
| guildRoleCreate(data: { | ||
| guild_id: string; | ||
| name?: string; | ||
| }): Promise<any>; | ||
| guildRoleUpdate(data: { | ||
| guild_id: string; | ||
| role_id: number; | ||
| name?: string; | ||
| color?: number; | ||
| hoist?: 0 | 1; | ||
| mentionable?: 0 | 1; | ||
| permissions?: number; | ||
| }): Promise<any>; | ||
| guildRoleDelete(data: { | ||
| guild_id: string; | ||
| role_id: number; | ||
| }): Promise<any>; | ||
| guildRoleGrant(data: { | ||
| guild_id: string; | ||
| user_id: string; | ||
| role_id: number; | ||
| }): Promise<any>; | ||
| guildRoleRevoke(data: { | ||
| guild_id: string; | ||
| user_id: string; | ||
| role_id: number; | ||
| }): Promise<any>; | ||
| blacklistCreate(data: { | ||
| guild_id: string; | ||
| target_id: string; | ||
| remark?: string; | ||
| del_msg_days?: number; | ||
| }): Promise<any>; | ||
| blacklistDelete(data: { | ||
| guild_id: string; | ||
| target_id: string; | ||
| }): Promise<any>; | ||
| } |
+153
-0
@@ -110,2 +110,9 @@ import axios from 'axios'; | ||
| } | ||
| messageList(target_id, params) { | ||
| return this.service({ | ||
| method: 'get', | ||
| url: ApiEnum.MessageList, | ||
| params: { target_id, ...params } | ||
| }); | ||
| } | ||
| messageAddReaction(data) { | ||
@@ -162,4 +169,150 @@ return this.service({ | ||
| } | ||
| guildList() { | ||
| return this.service({ | ||
| method: 'get', | ||
| url: ApiEnum.GuildList | ||
| }); | ||
| } | ||
| guildView(guild_id) { | ||
| return this.service({ | ||
| method: 'get', | ||
| url: ApiEnum.GuildView, | ||
| params: { guild_id } | ||
| }); | ||
| } | ||
| guildUserList(guild_id, params) { | ||
| return this.service({ | ||
| method: 'get', | ||
| url: ApiEnum.GuildUserList, | ||
| params: { guild_id, ...params } | ||
| }); | ||
| } | ||
| guildLeave(guild_id) { | ||
| return this.service({ | ||
| method: 'post', | ||
| url: ApiEnum.GuildLeave, | ||
| data: { guild_id } | ||
| }); | ||
| } | ||
| guildNickname(guild_id, nickname, user_id) { | ||
| return this.service({ | ||
| method: 'post', | ||
| url: ApiEnum.GuildNickname, | ||
| data: { guild_id, nickname, ...(user_id ? { user_id } : {}) } | ||
| }); | ||
| } | ||
| guildMuteCreate(guild_id, user_id, type) { | ||
| return this.service({ | ||
| method: 'post', | ||
| url: ApiEnum.GuildMuteCreate, | ||
| data: { guild_id, user_id, type } | ||
| }); | ||
| } | ||
| guildMuteDelete(guild_id, user_id, type) { | ||
| return this.service({ | ||
| method: 'post', | ||
| url: ApiEnum.GuildMuteDelete, | ||
| data: { guild_id, user_id, type } | ||
| }); | ||
| } | ||
| messageView(msg_id) { | ||
| return this.service({ | ||
| method: 'get', | ||
| url: ApiEnum.MessageView, | ||
| params: { msg_id } | ||
| }); | ||
| } | ||
| channelList(guild_id) { | ||
| return this.service({ | ||
| method: 'get', | ||
| url: ApiEnum.ChannelList, | ||
| params: { guild_id } | ||
| }); | ||
| } | ||
| channelView(channel_id) { | ||
| return this.service({ | ||
| method: 'get', | ||
| url: ApiEnum.ChannelView, | ||
| params: { target_id: channel_id } | ||
| }); | ||
| } | ||
| channelCreate(data) { | ||
| return this.service({ | ||
| method: 'post', | ||
| url: ApiEnum.ChannelCreate, | ||
| data | ||
| }); | ||
| } | ||
| channelUpdate(data) { | ||
| return this.service({ | ||
| method: 'post', | ||
| url: ApiEnum.ChannelUpdate, | ||
| data | ||
| }); | ||
| } | ||
| channelDelete(channel_id) { | ||
| return this.service({ | ||
| method: 'post', | ||
| url: ApiEnum.ChannelDelete, | ||
| data: { channel_id } | ||
| }); | ||
| } | ||
| guildRoleList(guild_id) { | ||
| return this.service({ | ||
| method: 'get', | ||
| url: ApiEnum.GuildRoleList, | ||
| params: { guild_id } | ||
| }); | ||
| } | ||
| guildRoleCreate(data) { | ||
| return this.service({ | ||
| method: 'post', | ||
| url: ApiEnum.GuildRoleCreate, | ||
| data | ||
| }); | ||
| } | ||
| guildRoleUpdate(data) { | ||
| return this.service({ | ||
| method: 'post', | ||
| url: ApiEnum.GuildRoleUpdate, | ||
| data | ||
| }); | ||
| } | ||
| guildRoleDelete(data) { | ||
| return this.service({ | ||
| method: 'post', | ||
| url: ApiEnum.GuildRoleDelete, | ||
| data | ||
| }); | ||
| } | ||
| guildRoleGrant(data) { | ||
| return this.service({ | ||
| method: 'post', | ||
| url: ApiEnum.GuildRoleGrant, | ||
| data | ||
| }); | ||
| } | ||
| guildRoleRevoke(data) { | ||
| return this.service({ | ||
| method: 'post', | ||
| url: ApiEnum.GuildRoleRevoke, | ||
| data | ||
| }); | ||
| } | ||
| blacklistCreate(data) { | ||
| return this.service({ | ||
| method: 'post', | ||
| url: ApiEnum.BlacklistCreate, | ||
| data | ||
| }); | ||
| } | ||
| blacklistDelete(data) { | ||
| return this.service({ | ||
| method: 'post', | ||
| url: ApiEnum.BlacklistDelete, | ||
| data | ||
| }); | ||
| } | ||
| } | ||
| export { API_URL, KOOKAPI }; |
+0
-1
@@ -8,3 +8,2 @@ import WebSocket from 'ws'; | ||
| #isConnected = false; | ||
| #sessionId = null; | ||
| #lastMessageSN = 0; | ||
@@ -11,0 +10,0 @@ constructor(opstion) { |
+4
-3
| { | ||
| "name": "@alemonjs/kook", | ||
| "version": "2.1.5", | ||
| "version": "2.1.6", | ||
| "description": "kook platform connection", | ||
@@ -61,3 +61,4 @@ "author": "lemonade", | ||
| "url": "https://github.com/lemonade-lab/alemonjs.git" | ||
| } | ||
| } | ||
| }, | ||
| "gitHead": "743b70375f728a1584ae149bbadcd04378540ade" | ||
| } |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
320390
7.57%48
2.13%3422
17.31%