Get Text Domain For Transalation

Is there a function which can be used to get the themes text-domain?

For example, if i want to provide this code to users without them needing to swap out the text-domain, can this be done, rather than this :

Use something like this so they don’t need to change the text-domain to match the theme they are using :