This commit is contained in:
cdle
2021-09-27 16:43:56 +08:00
parent c596dc0dc2
commit 0e0587f5a9
+18
View File
@@ -104,6 +104,24 @@ func initSys() {
return nil
},
},
{
Rules: []string{"raw ^编译$"},
Admin: true,
Handle: func(s Sender) interface{} {
s.Reply("正在编译程序...", E)
if err := CompileCode(); err != nil {
return err
}
s.Reply("编译程序完毕。", E)
sillyGirl.Set("rebootInfo", fmt.Sprintf("%v %v %v", s.GetImType(), s.GetChatID(), s.GetUserID()))
s.Reply("更新完成,即将重启!", E)
go func() {
time.Sleep(time.Second)
Daemon()
}()
return nil
},
},
{
Rules: []string{"raw ^重启$"},
Admin: true,