Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add LocationMessage example to basic.py #45

Open
biemster opened this issue Oct 7, 2024 · 0 comments
Open

Add LocationMessage example to basic.py #45

biemster opened this issue Oct 7, 2024 · 0 comments

Comments

@biemster
Copy link

biemster commented Oct 7, 2024

It took me quite a bit of investigation how to send a location message, but it's actually quite easy:

def location_message(label,lat,lon) -> Message:
    message = Message(locationMessage=LocationMessage(name=label, degreesLatitude=lat, degreesLongitude=lon))
    return message

client.send_message(chat, location_message(label='label text', lat=46.2333, lon=6.05))

I can make a PR if you accept those, otherwise these lines are easy to copy in basic.py if you prefer. Thanks for this awesome project!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant