mirror of
https://github.com/MrSedan/neuro-reply-bot-reworked.git
synced 2026-01-14 21:49:42 +03:00
Refactoring: handlers now implemented as classes. Module structure
This commit is contained in:
@@ -7,4 +7,8 @@ class Singleton:
|
||||
def __new__(cls, *args, **kwargs) -> Self:
|
||||
if cls not in cls._instances:
|
||||
cls._instances[cls] = super(Singleton, cls).__new__(cls)
|
||||
return cls._instances[cls]
|
||||
|
||||
@classmethod
|
||||
def get_instance(cls: Self):
|
||||
return cls._instances[cls]
|
||||
Reference in New Issue
Block a user