Airgram

Guides
/
/
Methods

api.setLocation()

Changes the location of the current user. Needs to be called if GetOption("is_location_visible") is true and location changes for more than 1 kilometer

Parameters SetLocationParams:

NameTypeDescription
location The new location of the user
Returns ApiResponse interface:
interface ApiResponse {
  _: 'setLocation' | 'error'
  airgram: Airgram
  request: {
    method: 'setLocation'
    params: SetLocationParams
  }
  response:  | 
  setState: (nextState: Record<string, unknown>) => void
  getState: () => Record<string, unknown>
}