restart
约 135 字小于 1 分钟
2025-10-13
Karin API Docs / restart
函数: restart()
restart(
selfId
,contact
,messageId
,isFront
,reloadDeps
):Promise
<{data
:string
|Error
;status
:"success"
|"failed"
; }>
定义于: packages/core/src/utils/system/restart.ts:12
重启Bot
参数
selfId
string
机器人的id 传e.self_id
contact
事件联系人信息 也就是从哪来的这条消息 传e.contact即可
messageId
string
消息id 传e.message_id
isFront
boolean
= true
是否为前台重启 默认是 不支持的环境会强制为pm2重启
reloadDeps
boolean
= false
是否为重新加载依赖 默认是false
返回
Promise
<{ data
: string
| Error
; status
: "success"
| "failed"
; }>