(voice): Rewrite initialise and refresh mechanism.

This commit is contained in:
2023-10-06 01:51:41 +03:00
parent 7d59bc6d2c
commit eaa44ab43c
11 changed files with 297 additions and 369 deletions

View File

@@ -236,7 +236,7 @@ class InteractiveSetting(BaseSetting[ParentID, SettingData, SettingValue]):
Callable[[ParentID, SettingData], Coroutine[Any, Any, None]]
"""
if self._event is not None and (bot := ctx_bot.get()) is not None:
bot.dispatch(self._event, self.parent_id, self.data)
bot.dispatch(self._event, self.parent_id, self)
def get_listener(self, key):
return self._listeners_.get(key, None)