调整配置文件结构,使不同插件可以将结果发送至不同telegram bot上

This commit is contained in:
lzybetter
2024-05-06 23:18:21 +08:00
parent 7dc397f833
commit c1f0ba1a1b
4 changed files with 49 additions and 33 deletions

9
util/singleton.py Normal file
View File

@@ -0,0 +1,9 @@
def singleton(cls):
instances = {}
def get_instance(*args, **kwargs):
if cls not in instances:
instances[cls] = cls(*args, **kwargs)
return instances[cls]
return get_instance