Skip to content

Latest commit

 

History

History
363 lines (257 loc) · 11.6 KB

File metadata and controls

363 lines (257 loc) · 11.6 KB

tlgr location

9 operations. Every one takes the global flags (--json, --plain, -a/--account, --results-only, --select, --dry-run, --yes, --no-input, --flood-wait-max, -v) anywhere on the line.

Command Summary
location live edit Update a live location (position, heading, proximity radius)
location live list Live locations shared in a chat
location live start Start sharing a live location
location live stop Stop sharing a live location
location nearby list People and groups near a point
location preview Render the map thumbnail for a location message
location search Search nearby places (venue provider inline bot)
location send Send a static location
location venue send Send a venue / place

location live edit

Update a live location (position, heading, proximity radius).

One edit carries all three; the fields not named are read off the message and resent unchanged.

tlgr location live edit <CHAT> <MSG_ID> [LAT] [LON] [OPTIONS]

mutating · returns LiveLocation

Argument Type Required Meaning
CHAT chat yes Chat.
MSG_ID msg-id yes The live message.
LAT number no Latitude.
LON number no Longitude.
Flag Type Default Meaning
--accuracy int accuracy_radius.
--heading int Direction arrow.
--proximity int Proximity-alert radius.

Also invocable as: tlgr location live update

$ tlgr location live edit @alice 12345 52.5210 13.4100 --json
Catalog coverage (3 full, 0 partial)

Full: location.live-heading, location.live-proximity, location.live-update

location live list

Live locations shared in a chat.

messages.getRecentLocations answers per chat and there is no cross-chat method, so a chat is required rather than optional.

tlgr location live list [CHAT] [OPTIONS]

paginated (LOCAL cursor) · returns Page[LiveLocation]

Argument Type Required Meaning
CHAT chat no Chat.
Flag Type Default Meaning
--mine flag Only my own active shares.

Pagination is transport-level: --limit/-n, --cursor TOKEN, --all (walked inside the daemon, paced by the account's own rate limiter).

$ tlgr location live list @alice --json
Catalog coverage (2 full, 0 partial)

Full: location.live-list-mine, location.recent-in-chat

location.live-list-mine is answered per chat with --mine: there is no MTProto method that enumerates a user's own live shares.

location live start

Start sharing a live location.

A headless client has to run its own updater: nothing moves the share by itself, so expires_at is reported rather than a duration.

tlgr location live start <CHAT> <LAT> <LON> [OPTIONS]

mutating · returns LiveLocation

Argument Type Required Meaning
CHAT chat yes Where to share it.
LAT number yes Latitude.
LON number yes Longitude.
Flag Type Default Meaning
--accuracy int accuracy_radius.
--effect text Animated message effect (private chats).
--follow text Keep updating from this source (a daemon job).
--heading int Movement direction, 1-360.
--paid-stars int Agree to pay N Stars per message.
--period text 1h How long to share (GUI: 15m/1h/8h).
--protect, --noforwards flag noforwards: block forwarding and saving.
--proximity int Proximity-alert radius.
--quick-reply text Send through a business quick reply.
--repeat daily weekly biweekly
--reply-to msg-id Reply to this message.
--schedule text Send later; 'online' means when the recipient is next online.
--send-as chat Post as a channel or anonymously.
--silent flag Send without a notification sound.
--topic msg-id Send inside a forum topic.
--typing number Show a typing action first.
--typing-auto flag Type for a duration estimated from the text length.
$ tlgr location live start @alice 52.5200 13.4050 --period 1h --json
Catalog coverage (1 full, 0 partial)

Full: location.live-send

location live stop

Stop sharing a live location.

The stop edit carries an empty point on purpose: a stopped share should not publish where you were when you stopped it.

tlgr location live stop [CHAT] [MSG_ID] [OPTIONS]

mutating · idempotent (reports already) · returns LiveStopped

Argument Type Required Meaning
CHAT chat no Chat.
MSG_ID msg-id no Which share.
Flag Type Default Meaning
--every flag Stop every live share in that chat.
$ tlgr location live stop @alice 12345 --json
Catalog coverage (1 full, 0 partial)

Full: location.live-stop

location nearby list

People and groups near a point.

--publish puts your own position on other people's lists for the duration given, and --unpublish takes it off again. Looking never publishes.

tlgr location nearby list <LAT> <LON> [OPTIONS]

mutating · destructive (needs --yes off a TTY) · returns Nearby

Argument Type Required Meaning
LAT number yes Latitude.
LON number yes Longitude.
Flag Type Default Meaning
--accuracy int accuracy_radius.
--background flag Background refresh, without a visible listing.
--publish text Make myself visible for this long.
--unpublish flag Stop sharing (self_expires=0).
$ tlgr location nearby list 52.5200 13.4050 --json
Catalog coverage (3 full, 0 partial)

Full: contacts-users.nearby-publish, contacts-users.nearby-stop, location.people-nearby

location preview

Render the map thumbnail for a location message.

Served by the webfile data centre, not the home DC, and it needs the geoPoint.access_hash carried by the received message.

tlgr location preview <CHAT> <MSG_ID> [OPTIONS]

returns MapPreview

Argument Type Required Meaning
CHAT chat yes Chat.
MSG_ID msg-id yes Location message id.
Flag Type Default Meaning
--out path Write the PNG here.
--scale int 2 Pixel density 1-3.
--size text 512x512 16-1024 per side.
--stdout flag Return the image base64 instead.
--zoom int 15 13-20.
$ tlgr location preview @alice 12345 --out /tmp/map.png --json
Catalog coverage (1 full, 0 partial)

Full: location.map-preview

location search

Search nearby places (venue provider inline bot).

There is no venue-search method: this is an inline query against help.config.venue_search_username with a geo point attached.

tlgr location search <LAT> <LON> [QUERY] [OPTIONS]

paginated (PARTICIPANTS cursor) · returns Page[Venue]

Argument Type Required Meaning
LAT number yes Latitude.
LON number yes Longitude.
QUERY text no What to look for.
Flag Type Default Meaning
--chat chat Peer context for the inline query.
--provider text Override config.venue_search_username.

Pagination is transport-level: --limit/-n, --cursor TOKEN, --all (walked inside the daemon, paced by the account's own rate limiter).

$ tlgr location search 52.5200 13.4050 museum --json
Catalog coverage (1 full, 0 partial)

Full: location.venue-search

location send

Send a static location.

Shares the send-option set with message send.

tlgr location send <CHAT> <LAT> <LON> [OPTIONS]

mutating · returns SentLocation

Argument Type Required Meaning
CHAT chat yes Where to send it.
LAT number yes Latitude.
LON number yes Longitude.
Flag Type Default Meaning
--accuracy int accuracy_radius.
--effect text Animated message effect (private chats).
--paid-stars int Agree to pay N Stars per message.
--protect, --noforwards flag noforwards: block forwarding and saving.
--quick-reply text Send through a business quick reply.
--repeat daily weekly biweekly
--reply-to msg-id Reply to this message.
--schedule text Send later; 'online' means when the recipient is next online.
--send-as chat Post as a channel or anonymously.
--silent flag Send without a notification sound.
--topic msg-id Send inside a forum topic.
--typing number Show a typing action first.
--typing-auto flag Type for a duration estimated from the text length.
$ tlgr location send @alice 52.5200 13.4050 --json
Catalog coverage (1 full, 0 partial)

Full: location.send-static

location venue send

Send a venue / place.

Use location search to obtain provider/venue-id pairs.

tlgr location venue send <CHAT> <LAT> <LON> [OPTIONS]

mutating · returns SentLocation

Argument Type Required Meaning
CHAT chat yes Where to send it.
LAT number yes Latitude.
LON number yes Longitude.
Flag Type Default Meaning
--address text Street address.
--effect text Animated message effect (private chats).
--paid-stars int Agree to pay N Stars per message.
--protect, --noforwards flag noforwards: block forwarding and saving.
--provider text Venue provider.
--quick-reply text Send through a business quick reply.
--repeat daily weekly biweekly
--reply-to msg-id Reply to this message.
--schedule text Send later; 'online' means when the recipient is next online.
--send-as chat Post as a channel or anonymously.
--silent flag Send without a notification sound.
--title text Venue name.
--topic msg-id Send inside a forum topic.
--typing number Show a typing action first.
--typing-auto flag Type for a duration estimated from the text length.
--venue-id text Provider venue id.
--venue-type text Provider venue category.
$ tlgr location venue send @alice 52.5163 13.3777 --title 'Brandenburg Gate' --json
Catalog coverage (1 full, 0 partial)

Full: location.send-venue