diff --git a/conf/demo_reply.php b/conf/demo_reply.php index cee2b3e..4f42673 100644 --- a/conf/demo_reply.php +++ b/conf/demo_reply.php @@ -61,7 +61,7 @@ return reply( 回复 丨 屏蔽 更新账号 | 清理过期账号 取消屏蔽 | 任务列表 - 设置管理员 + 设置管理员 | 取消管理员 ——————————— 京东机器人 ] diff --git a/models/command.go b/models/command.go index 101dbfb..91bc837 100644 --- a/models/command.go +++ b/models/command.go @@ -311,6 +311,15 @@ var codeSignals = []CodeSignal{ return "已设置管理员" }, }, + { + Command: []string{"取消管理员"}, + Admin: true, + Handle: func(sender *Sender) interface{} { + ctt := sender.JoinContens() + db.Delete(&UserAdmin{Content: ctt}) + return "已取消管理员" + }, + }, { Command: []string{"赌一把"}, Handle: func(sender *Sender) interface{} {