@kotori-bot/kotori-plugin-adapter-onebot
v2.1.0
Published
Adapter For Onebot 11
Downloads
24
Maintainers
Readme
@kotori-bot/kotori-plugin-adapter-onebot
Base on OneBot 11 Standard, you can use the these programs that support OneBot 11's implement to connect with qq:
- For Linux: NapCat
- For Windows: LiteLoaderQQNT with LLOneBot
- No more available: go-cqhttp
Config
export const config = Tsu.Union(
Tsu.Object({
mode: Tsu.Literal('ws').describe('Connect mode: WebSocket'),
port: Tsu.Number().port().describe('WebSocket server port'),
address: Tsu.String()
.regexp(/^ws(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w-./?%&=]*)?$/)
.default('ws://127.0.0.1')
.describe('WebSocket address'),
retry: Tsu.Number().int().min(1).default(10).describe('try reconnect times when disconnected')
}),
Tsu.Object({
mode: Tsu.Literal('ws-reverse').describe('Connect mode: WebSocket Reverse')
})
)
Supports
Events
- on_message (exclude
MessageScope.CHANNEL
) - on_message_delete (exclude
MessageScope.CHANNEL
) - on_request (exclude
RequestScope.CHANNEL
) - on_group_increase
- on_group_decrease
- on_group_admin
- on_group_ban
- custom: onebot_poke
Api
- sendPrivateMsg
- sendGroupMsg
- deleteMsg
- getUserInfo
- getFriendList
- getGroupInfo
- getGroupList
- getGroupMemberInfo
- getGroupMemberList
- setGroupName
- leaveGroup
- setGroupAdmin
- setGroupCard
- setGroupAvatar
- setGroupBan
- setGroupWholeBan
- setGroupNotice
- setGroupKick
Elements
- text
- mention
- mentionAll
- image
- voice
- video
- reply