From 0ef1797ff1977100ae42fb8649de6ada5bc25d65 Mon Sep 17 00:00:00 2001 From: Sourcery AI <> Date: Fri, 21 Jul 2023 10:26:14 +0000 Subject: [PATCH] 'Refactored by Sourcery' --- OlivaXXX/main.py | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/OlivaXXX/main.py b/OlivaXXX/main.py index a076792..429ddfd 100644 --- a/OlivaXXX/main.py +++ b/OlivaXXX/main.py @@ -23,24 +23,22 @@ import OlivaXXX class Event(object): - def init(plugin_event, Proc): + def init(self, Proc): pass - def private_message(plugin_event,Proc): - util(plugin_event,Proc) + def private_message(self, Proc): + util(self, Proc) - def group_message(plugin_event,Proc): - util(plugin_event,Proc) + def group_message(self, Proc): + util(self, Proc) - def save(plugin_event, Proc): + def save(self, Proc): pass - def menu(plugin_event, Proc): - if plugin_event.data.namespace == 'DailyNews': # type: ignore - if plugin_event.data.event == 'Menu_Config': # type: ignore + def menu(self, Proc): + if self.data.namespace == 'DailyNews': # type: ignore + if self.data.event == 'Menu_Config': # type: ignore logg("有笨蛋打开了配置") - elif plugin_event.data.event == 'Menu_About': # type: ignore - pass def util(plugin_event,Proc):