def wechat_location_msg(self, msg: wxpy.Message) -> Message:
     efb_msg = Message()
     efb_msg.text = msg.text.split('\n')[0][:-1]
     efb_msg.attributes = LocationAttribute(latitude=float(msg.location['x']),
                                            longitude=float(msg.location['y']))
     efb_msg.type = MsgType.Location
     return efb_msg
 def edit_location_message(self,
                           message: Message,
                           reactions: bool = False,
                           commands: bool = False,
                           substitution: bool = False) -> Message:
     message.text = f"Content of edited location message with ID {message.uid}"
     message.edit = True
     message.attributes = LocationAttribute(
         latitude=random.uniform(0.0, 90.0),
         longitude=random.uniform(0.0, 90.0))
     message = self.attach_message_properties(message, reactions, commands,
                                              substitution)
     self.messages_sent[message.uid] = message
     coordinator.send_message(message)
     return message
    def edit_link_message(self,
                          message: Message,
                          reactions: bool = False,
                          commands: bool = False,
                          substitution: bool = False) -> Message:

        message.text = f"Content of edited link message with ID {message.uid}"
        message.edit = True
        message.attributes = LinkAttribute(
            title="EH Forwarder Bot (edited)",
            description="EH Forwarder Bot project site. (edited)",
            url="https://efb.1a23.studio/#edited")
        message = self.attach_message_properties(message, reactions, commands,
                                                 substitution)
        self.messages_sent[message.uid] = message
        coordinator.send_message(message)
        return message