Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/LSTM-Kirigaya/LBot
/ functions
Functions
268 in github.com/LSTM-Kirigaya/LBot
⨍
Functions
268
◇
Types & classes
128
↓ 44 callers
Method
send
(apiJSON: Lagrange.ApiJSON)
src/core/context.ts:33
↓ 16 callers
Method
get
()
src/core/mapper.ts:27
↓ 8 callers
Method
sendPrivateMsg
* @description 发送私聊消息 * @param user_id 对方 QQ 号 * @param message 要发送的内容 * @param auto_escape 消息内容是否作为纯文本发送(即不解析 CQ 码),只在 message 字段是字符串时
src/core/context.ts:129
↓ 7 callers
Method
close
()
src/mcp/transport.ts:103
↓ 7 callers
Method
set
(v: any)
src/core/mapper.ts:28
↓ 6 callers
Method
launch
* @description 启动 QQ 服务进程 * 连接参数(type/host/port/accessToken/path)与配置文件同时传入时,以传入参数为准
src/core/context.ts:880
↓ 5 callers
Method
finishSession
()
src/core/context.ts:114
↓ 5 callers
Function
getGrad
()
src/util/banner.ts:5
↓ 5 callers
Method
getGroupMemberInfo
* @description 获取群成员信息 * @param group_id 群号 * @param user_id QQ 号 * @param no_cache 是否不使用缓存(使用缓存可能更新不及时,但响应更快)
src/core/context.ts:516
↓ 5 callers
Method
getGroupMsgHistory
* @description 获取群消息历史记录 * @param group_id 群号 * @param message_seq 消息序号 * @param count 获取数量 * @param reverse_order 是否倒序
src/core/context.ts:247
↓ 4 callers
Method
create
* 工厂函数:一行搞定实例化 + 预下载 + 预热
src/mcp/memory.ts:56
↓ 4 callers
Method
embed
(text: string)
src/mcp/memory.ts:301
↓ 4 callers
Function
getConfigurationPath
(...segments: string[])
src/util/index.ts:77
↓ 4 callers
Method
getGroupInfo
* @description 获取群信息 * @param group_id 群号 * @param no_cache 是否不使用缓存(使用缓存可能更新不及时,但响应更快)
src/core/context.ts:493
↓ 4 callers
Method
openTable
()
src/mcp/memory.ts:314
↓ 3 callers
Method
checkAuthorization
* 检查用户是否有权限执行敏感操作
src/mcp/memory.ts:96
↓ 3 callers
Method
getRawText
* @description 获取消息的纯文本信息,如果有多段消息,默认按照回车进行分割 * @param config * @returns
src/core/context.ts:175
↓ 3 callers
Method
onMounted
* @description 注册客户端初始化完成后的行为
src/core/context.ts:972
↓ 3 callers
Method
onPrivateUser
* @description 私聊用户响应函数的注册函数 * @param user_id 私聊用户的 QQ 号码 * @returns
src/core/mapper.ts:264
↓ 3 callers
Method
sendGroupMsg
* @description 发送群消息 * @param group_id 群号 * @param message 要发送的内容 * @param auto_escape 消息内容是否作为纯文本发送(即不解析 CQ 码),只在 message 字段是字符串时有效
src/core/context.ts:142
↓ 3 callers
Method
sendMessage
* @description 根据回复者回消息,如果是群聊,则在群聊中回复;如果是私聊,直接回复 * @param message * @returns
src/core/context.ts:199
↓ 3 callers
Method
start
()
src/mcp/transport.ts:74
↓ 2 callers
Function
assert
(condition: boolean, message: string)
src/test/test-websearch.ts:14
↓ 2 callers
Method
enqueue
(item: T)
src/util/index.ts:37
↓ 2 callers
Method
escapeQuote
(s: string)
src/mcp/memory.ts:349
↓ 2 callers
Function
extractMessageContent
* 从消息对象中提取纯文本内容
src/util/message-search.ts:39
↓ 2 callers
Method
getAllGroupIds
* 获取所有存在记录的 groupIds
src/mcp/memory.ts:331
↓ 2 callers
Method
getFriendMsgHistory
* @description 获取好友消息历史记录 * @param user_id 用户QQ号 * @param message_seq 消息序号 * @param count 获取数量 * @param reverse_order 是否倒序
src/core/context.ts:266
↓ 2 callers
Method
getLoginInfo
* @description 获取登录号信息
src/core/context.ts:459
↓ 2 callers
Function
getTestImageFileUrl
获取测试用图片的 file:// URL(以项目根为 cwd 时 src/test/hello.jpg)
src/test/main-forward-ws.ts:23
↓ 2 callers
Function
handleAutoDownloadImage
(c: LagrangeContext<Lagrange.GroupMessage | Lagrange.PrivateMessage>)
src/util/index.ts:92
↓ 2 callers
Method
initMemory
(option: McpLanchOption = {})
src/mcp/index.ts:33
↓ 2 callers
Function
matchesKeyword
* 检查文本是否匹配关键词
src/util/message-search.ts:60
↓ 2 callers
Method
register
(name?: string)
src/plugin/index.ts:24
↓ 1 callers
Method
addController
(controller: any)
src/core/context.ts:983
↓ 1 callers
Method
addMemory
* 添加记忆 * @param content 多条文本 * @param userId 用户 ID(用于权限检查) * @param groupId 群组 ID(必须提供) * @param key 唯一标识(可选;不传则每条生成 uuid) *
src/mcp/memory.ts:113
↓ 1 callers
Function
atMessagePrompt
( context: LagrangeContext<Lagrange.Message>, group_id: number, userName: string, atUserId?: s
src/mcp/prompt.ts:8
↓ 1 callers
Function
atQueryPrompt
( content: string, reference: string = '无' )
src/mcp/prompt.ts:41
↓ 1 callers
Method
canSendImage
* @description 检查是否可以发送图片
src/core/context.ts:595
↓ 1 callers
Method
clientConnect
(ws: WebSocket)
src/core/context.ts:776
↓ 1 callers
Function
command
(cmd: string)
src/util/index.ts:13
↓ 1 callers
Function
copy
(s, d)
scripts/copy-skills.js:7
↓ 1 callers
Function
createMcpServer
( context: LagrangeContext<Lagrange.Message>, option: McpLanchOption = {} )
src/mcp/index.ts:157
↓ 1 callers
Function
createSandbox
* 构建 vm 沙箱:仅暴露必要内置对象(context/memory/util 通过函数参数传入,不放入全局) * 使用自定义 console 捕获 log/info/warn/debug/error 输出,供 AI 查看
src/mcp/executor.ts:48
↓ 1 callers
Method
createTableWithFirstRow
(firstRow: any)
src/mcp/memory.ts:320
↓ 1 callers
Function
escapeRegExp
* 转义正则表达式特殊字符
src/util/message-search.ts:87
↓ 1 callers
Method
get
()
src/plugin/index.ts:14
↓ 1 callers
Function
getDirname
* 获取当前模块的 __dirname(兼容 ESM 和 CJS) * 在 CJS 中直接使用 __dirname,在 ESM 中通过堆栈追踪获取路径
src/mcp/extraTool.ts:12
↓ 1 callers
Method
getEmbedder
()
src/mcp/memory.ts:294
↓ 1 callers
Method
getFriendList
* @description 获取好友列表
src/core/context.ts:481
↓ 1 callers
Method
getGroupMemberList
* @description 获取群成员列表 * @param group_id 群号
src/core/context.ts:527
↓ 1 callers
Function
getGroupMessageImagePath
(groupId: number, subType: number, fileName: string)
src/util/index.ts:87
↓ 1 callers
Function
getLocalIP
()
src/util/network.ts:4
↓ 1 callers
Method
getMem
()
src/mcp/index.ts:23
↓ 1 callers
Method
getMsg
* @description 获取消息 * @param message_id 消息 ID
src/core/context.ts:233
↓ 1 callers
Function
getPrivateMessageImagePath
(userId: number, subType: number, fileName: string)
src/util/index.ts:82
↓ 1 callers
Method
getStrangerInfo
* @description 获取陌生人信息 * @param user_id QQ 号 * @param no_cache 是否不使用缓存(使用缓存可能更新不及时,但响应更快)
src/core/context.ts:471
↓ 1 callers
Function
getUserAvatar
(qq: number)
src/test/avatar.test.ts:4
↓ 1 callers
Function
getUserAvatarPath
(user_id: number, no_cache: boolean = false)
src/util/index.ts:126
↓ 1 callers
Method
init
* 预下载并加载模型
src/mcp/memory.ts:66
↓ 1 callers
Function
isValidResult
(r: WebSearchResult)
src/test/test-websearch.ts:20
↓ 1 callers
Function
loadEnv
()
src/test/test-mcp.ts:18
↓ 1 callers
Function
loadEnv
()
src/test/main-forward-ws.ts:50
↓ 1 callers
Function
main
()
src/test/test-mcp.ts:26
↓ 1 callers
Function
main
()
src/test/main-forward-ws.ts:58
↓ 1 callers
Function
main
()
src/test/test-websearch.ts:30
↓ 1 callers
Method
messagePipe
(message: Lagrange.MessagePostType)
src/core/event.ts:25
↓ 1 callers
Method
noticePipe
(message: Lagrange.NoticePostType)
src/core/event.ts:39
↓ 1 callers
Method
onAddFriendOrGroup
* @description 有人想要入群或者加机器人好友的申请事件响应函数,注册一次,全局响应
src/core/mapper.ts:338
↓ 1 callers
Method
onGroup
* @description 群聊用户响应函数的注册函数 * @param group_id 群聊的群号 * @param config 响应配置 * @returns
src/core/mapper.ts:283
↓ 1 callers
Method
onGroupIncrease
* @description 新人入群的响应函数的注册 * @param group_id 发生新人入群事件的群号
src/core/mapper.ts:322
↓ 1 callers
Method
onUnmounted
* @description 注册客户端退出时的行为
src/core/context.ts:979
↓ 1 callers
Function
pushOut
(...args: unknown[])
src/mcp/executor.ts:49
↓ 1 callers
Method
register
(option: McpLanchOption)
src/mcp/index.ts:144
↓ 1 callers
Method
registerExecuteTask
* 只注册一个工具:execute_task。AI 根据用户意图生成 TS/JS 代码,在此执行并拿到结果。
src/mcp/index.ts:68
↓ 1 callers
Method
registerPrompts
* 注册 prompt(不占工具 token)
src/mcp/index.ts:102
↓ 1 callers
Method
registerServer
(server: LagrangeServer)
src/core/event.ts:11
↓ 1 callers
Method
requestPipe
(message: Lagrange.RequestPostType)
src/core/event.ts:52
↓ 1 callers
Method
resolveGroup
(c: LagrangeContext<Lagrange.GroupMessage>)
src/core/mapper.ts:155
↓ 1 callers
Method
resolveGroupIncrease
(c: LagrangeContext<Lagrange.ApproveMessage>)
src/core/mapper.ts:237
↓ 1 callers
Method
resolveOfflineFile
(c: LagrangeContext<Lagrange.FileMessage>)
src/core/mapper.ts:246
↓ 1 callers
Method
resolvePrivateUser
(c: LagrangeContext<Lagrange.PrivateMessage>)
src/core/mapper.ts:125
↓ 1 callers
Method
resolveRequest
(c: LagrangeContext<Lagrange.RequestPostType>)
src/core/mapper.ts:253
↓ 1 callers
Function
run
()
src/mcp/executor.ts:179
↓ 1 callers
Method
run
(config: LaunchOption)
src/core/context.ts:788
↓ 1 callers
Method
run
(message: Lagrange.Message)
src/core/event.ts:15
↓ 1 callers
Function
runTaskCode
( code: string, sandbox: TaskSandbox, timeoutMs: number = DEFAULT_TIMEOUT_MS )
src/mcp/executor.ts:139
↓ 1 callers
Function
searchGroupMsgHistory
( context: LagrangeContext<Lagrange.Message>, options: SearchHistoryOptions )
src/util/message-search.ts:98
↓ 1 callers
Method
sendGroupNotice
* @description 发送群公告 * @param group_id * @param notice_type * @param sub_type * @param file * @param user_id
src/core/context.ts:687
↓ 1 callers
Method
serverConnect
(wsServer: WebSocket.Server)
src/core/context.ts:764
↓ 1 callers
Method
set
(v: any)
src/plugin/index.ts:15
↓ 1 callers
Method
setGroupAddRequest
* @description 处理加群请求/邀请 * @param flag 加群请求的 flag(需从上报的数据中获得) * @param sub_type add 或 invite,请求类型(需要和上报消息中的 sub_type 字段相符) * @param app
src/core/context.ts:449
↓ 1 callers
Method
setupRoutes
()
src/mcp/transport.ts:27
↓ 1 callers
Function
showBanner
(text = "L.BOT")
src/util/banner.ts:13
↓ 1 callers
Function
transpileToJS
* 将 TypeScript 源码转成 JavaScript(若已是合法 JS 则原样通过)
src/mcp/executor.ts:28
↓ 1 callers
Method
uploadGroupFile
* @description 上传群文件 * @param group_id 群号 * @param file 文件绝对路径 * @param name 文件名称
src/core/context.ts:672
↓ 1 callers
Method
use
(name: string)
src/plugin/index.ts:37
↓ 1 callers
Method
warmup
* 预热
src/mcp/memory.ts:87
↓ 1 callers
Function
websearch
(query: string)
src/mcp/extraTool.ts:150
Function
Anonymous
()
src/core/factory.ts:93
next →
1–100 of 268, ranked by callers