From 1d70e1fa6538752cd45af1e69eaa429404bb205d Mon Sep 17 00:00:00 2001 From: ZJY <764763903@qq.com> Date: Thu, 9 Sep 2021 11:24:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=8F=96=E6=B6=88=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E5=91=98=E5=8A=9F=E8=83=BD=20=20=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- conf/demo_reply.php | 2 +- models/command.go | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) 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{} {