Added afk/brb

Timer messages ("Timer XX has yyy left") now get resumed after a bot restart
Alliance relay is discord compatible now. [Orgbot]
This commit is contained in:
2021-10-26 22:35:31 +02:00
parent bd8055dac7
commit 2d7ecf4883
14 changed files with 119 additions and 48 deletions
@@ -42,6 +42,7 @@ class PrivateChannelController:
self.account_service: AccountService = registry.get_instance("account_service")
self.db: DB = registry.get_instance("db")
self.priv: PrivateChannelService = registry.get_instance("private_channel_service")
self.online_controller = registry.get_instance("online_controller", is_optional=True)
def pre_start(self):
self.db.create_view("online")
@@ -205,6 +206,10 @@ class PrivateChannelController:
msg = f"{self.text.format_char_info(self.pork.get_character_info(event_data.char_id))} joined us {info}"
self.bot.send_private_channel_message(msg, fire_outgoing_event=False)
self.message_hub_service.send_message(self.MESSAGE_SOURCE, None, msg, self.PRIVATE_CHANNEL_PREFIX + msg)
afk_list = {}
if self.online_controller:
afk_list = self.online_controller.afk_list
od = OnlineDisplay(self.text, self.util, self.db, afk_list)
od = OnlineDisplay(self.text, self.util, self.db)
params = [self.bot.name, self.bot.get_char_id()]
self.bot.send_mass_message(event_data.char_id,