From 3f89606ab66e0d84ffc40581b851ef1f2f8b2e1a Mon Sep 17 00:00:00 2001 From: omg-xtao <100690902+omg-xtao@users.noreply.github.com> Date: Mon, 14 Mar 2022 13:13:26 +0800 Subject: [PATCH] refactor: clean up --- efb_qq_plugin_go_cqhttp/GoCQHttp.py | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/efb_qq_plugin_go_cqhttp/GoCQHttp.py b/efb_qq_plugin_go_cqhttp/GoCQHttp.py index 293c4d2..ea18b6e 100644 --- a/efb_qq_plugin_go_cqhttp/GoCQHttp.py +++ b/efb_qq_plugin_go_cqhttp/GoCQHttp.py @@ -307,15 +307,11 @@ class GoCQHttp(BaseClient): @self.coolq_bot.on_notice("group_admin") def handle_group_admin_msg(context): - context["event_description"] = self._("\u2139 Group Admin Change Event") + context["event_description"] = "\u2139 Group Admin Change Event" if (context["sub_type"]) == "set": - text = self._( - "{nickname}({context[user_id]}) " "has been appointed as the group({group_name}) administrator" - ) + text = "{nickname}({context[user_id]}) has been appointed as the group({group_name}) administrator" else: - text = self._( - "{nickname}({context[user_id]}) " "has been de-appointed as the group({group_name}) administrator" - ) + text = "{nickname}({context[user_id]}) has been de-appointed as the group({group_name}) administrator" original_group = self.get_group_info(context["group_id"], False) group_name = context["group_id"] @@ -332,16 +328,16 @@ class GoCQHttp(BaseClient): @self.coolq_bot.on_notice("group_ban") def handle_group_ban_msg(context): - context["event_description"] = self._("\u2139 Group Member Restrict Event") + context["event_description"] = "\u2139 Group Member Restrict Event" if (context["sub_type"]) == "ban": - text = self._( + text = ( "{nickname}({context[user_id]}) " "is restricted for speaking for {time} at the group({group_name}) by " "{nickname_}({context[operator_id]})" ) time_text = strf_time(context["duration"]) else: - text = self._( + text = ( "{nickname}({context[user_id]}) " "is lifted from restrictions at the group({group_name}) by " "{nickname_}({context[operator_id]}){time}"