File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -164,7 +164,10 @@ export const updatePlugin = karin.command(/^#(全部)?(强制)?更新(.*)?$/, as
164164 let res
165165 if ( name !== 'node-karin' ) {
166166 const info = getPluginInfo ( name . trim ( ) )
167- if ( ! info ) return await e . reply ( '插件未安装~' , { reply : true } )
167+ if ( ! info ) {
168+ await e . reply ( '插件未安装~' , { reply : true } )
169+ return false
170+ }
168171 if ( info . type === 'app' ) return await e . reply ( '应用插件不支持更新~' , { reply : true } )
169172 res = info . type === 'git'
170173 ? await updateGitPlugin ( info . dir , cmd , 120 )
@@ -180,7 +183,7 @@ export const updatePlugin = karin.command(/^#(全部)?(强制)?更新(.*)?$/, as
180183 }
181184 return await e . reply ( `\n更新成功\n${ res . data } ` , { at : true } )
182185 }
183- } )
186+ } , { name : '更新插件' , perm : 'admin' , priority : 100 } )
184187/** 检查更新 */
185188export const check = karin . command ( / ^ # 检 查 更 新 / , async ( e ) => {
186189 let name = e . msg . replace ( / ^ # 检 查 更 新 / , '' ) . trim ( )
You can’t perform that action at this time.
0 commit comments