
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
koishi-plugin-blive
Advanced tools
B 站直播订阅。在主播上下播时进行提醒。
Original plugin by Dragon-Fish 824399619@qq.com
Original repository: https://github.com/koishijs/koishi-plugin-blive
Refactored by i'DLisT me@idl.ist (https://idl.ist/)
通过网页控制台安装此插件,或通过命令行:
npm i koishi-plugin-blive
然后在配置文件或入口文件中将插件添加至你的机器人中。
使用 -help blive
可以在 bot 内查看帮助。
这个插件有 使用数据库 与 不使用数据库 两种模式,默认使用数据库。
id
: 房间号
需要 2 级权限。
新增订阅。仅在使用数据库时可用。
id
: 房间号
需要 2 级权限。
移除订阅。仅在使用数据库时可用。
page
: 列表页码
显示订阅列表。
keyword
: 关键字
搜索主播 / 直播间。
--room
, -r
: 使用房间号进行搜索(默认行为)。此时 keyword
为房间号。
--uid
, -u
: 使用主播 UID 进行搜索。此时 keyword
为 UID。
--name
, -n
: 使用用户名进行搜索。此时 keyword
为用户名关键字,默认将显示前 10 条结果,可使用配置项更改显示条数。
这个插件现在似乎不需要配置就可以使用,并提供了一些可能用得到的配置项。
配置项 | 默认值 | 说明 |
---|---|---|
useDatabase | true | 是否使用数据库。 *1 |
pollInterval | 60000 | 访问 B 站 API 的时间间隔(单位毫秒)*2 |
showIcon | true | 在主播上下播时是否同时发送头像。使用搜索指令时不受此选项的影响。 |
pageLimit | 10 | 分页显示群内订阅主播时,每页的最多显示条数。 |
searchPageLimit | 10 | 在使用用户名搜索主播时的最多显示条数。 |
maxSubsPerChannel | 10 | 每个群 / 频道最大订阅数量。仅在使用数据库时有效。 |
subscriptions | [] | 订阅列表。仅在不使用数据库时有效。*3 |
*1 在没有配置数据库的情况下,即使这个选项设置为 true
也无法启用数据库。
*2 API 捅得地太频繁会被返回 429 (too many requests)。
*3 这个列表为一个数组,每一项遵循以下格式:
interface SubscriptionItem {
platform: string // 用于推送的机器人的平台。QQ 则为 `onebot`。
assignee: string // 用于推送的机器人 ID。
room: string // 主播房间号。
channel: string // 订阅此主播的群号。
guild?: string // 订阅此主播的服务器号。仅 QQ 频道或开黑啦需要此项。
}
例如:
{
platform: 'onebot',
assignee: '114514',
room: '364364',
channel: '12345678',
// 因为不是 QQ 频道所以不填写 guild。
}
在安装了 sharp
、node-canvas
或 skia-canvas
的情况下,这个插件会用其缩小主播头像。优先级为 sharp
> skia-canvas
> node-canvas
> 什么也没有装。
因为并没有多 bot 和对 QQ 频道的测试环境,所以对这些情况的支持可能会有问题。
console.log
。package.json
中的 koishi
字段。此插件需要 Koishi 版本至少为 v4.9。如有需要,请使用 v1.3.3。
template
API 于 Koishi 4.9 被移除,而新的 ctx.i18n
对主动推送的支持难度较高,因此字符串自定义功能被放弃。如果有此类需求请考虑 Fork 或提出对 ctx.i18n
进行支持的 Pull Request。service
变更为 internal/service
,以及 ctx.bots.get()
变更为 ctx.bots[]
。此版本没有上传到 npm,如需要使用请直接下载源码
sessdata
。Ctrl + F
重构结果有几个变量没重命名到,导致多个群关注同一主播时推送不正常的问题。logger.debug
,可能查错会更加方便了(虽然本身 JS
插件无需转译,直接源码调试也方便)console.log
忘了删的问题。sharp
的情况下头像无法被发出的问题。showIcon
,可以设置在开关播时是否同时发送头像了。Schema
,虽然配置项 subscriptions
因为形状太复杂而暂时无法支持。subscriptions
的格式有更改,需要手动指定 assignee
(即手动指定由哪个 bot 推送消息)了。如果需要继续在 v3 使用,请使用 v0.3。
FAQs
Bilibili live subscription for Koishi.js.
The npm package koishi-plugin-blive receives a total of 1 weekly downloads. As such, koishi-plugin-blive popularity was classified as not popular.
We found that koishi-plugin-blive demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.