File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -144,6 +144,7 @@ export const plugins = karin.command(/^#插件列表$/, async (e) => {
144144
145145/** 更新插件 */
146146export const updatePlugin = karin . command ( / ^ # ( 全 部 ) ? ( 强 制 ) ? 更 新 ( .* ) ? $ / , async ( e ) => {
147+ if ( ! e . isMaster ) return false
147148 const [ , all , force , name = 'node-karin' ] = e . msg . match ( / ^ # ( 全 部 ) ? ( 强 制 ) ? 更 新 ( .* ) ? $ / ) !
148149 const cmd = force ? 'git reset --hard && git pull --allow-unrelated-histories' : 'git pull'
149150 if ( all ) {
@@ -183,7 +184,7 @@ export const updatePlugin = karin.command(/^#(全部)?(强制)?更新(.*)?$/, as
183184 }
184185 return await e . reply ( `\n更新成功\n${ res . data } ` , { at : true } )
185186 }
186- } , { name : '更新插件' , perm : 'admin' , priority : 100 } )
187+ } , { name : '更新插件' , priority : 100 } )
187188/** 检查更新 */
188189export const check = karin . command ( / ^ # 检 查 更 新 / , async ( e ) => {
189190 let name = e . msg . replace ( / ^ # 检 查 更 新 / , '' ) . trim ( )
You can’t perform that action at this time.
0 commit comments