Example #1
0
 def send_reactions_update(self,
                           message: Message) -> MessageReactionsUpdate:
     reactions = self.build_reactions(message.chat)
     message.reactions = reactions
     status = MessageReactionsUpdate(chat=message.chat,
                                     msg_id=message.uid,
                                     reactions=reactions)
     coordinator.send_status(status)
     return status
Example #2
0
 def attach_message_properties(self, message: Message, reactions: bool,
                               commands: bool,
                               substitutions: bool) -> Message:
     reactions_val = self.build_reactions(message.chat) if reactions else {}
     commands_val = self.build_message_commands() if commands else None
     substitutions_val = self.build_substitutions(
         message.text, message.chat) if substitutions else None
     message.reactions = reactions_val
     message.commands = commands_val
     message.substitutions = substitutions_val
     return message