Airgram

Guides
/
/
Methods

api.setChatLocation()

Changes the location of a chat. Available only for some location-based supergroups, use supergroupFullInfo.can_set_location to check whether the method is allowed to use

Parameters SetChatLocationParams:

NameTypeDescription
chatIdnumber Chat identifier
location New location for the chat; must be valid and not null
Returns ApiResponse interface:
interface ApiResponse {
  _: 'setChatLocation' | 'error'
  airgram: Airgram
  request: {
    method: 'setChatLocation'
    params: SetChatLocationParams
  }
  response:  | 
  setState: (nextState: Record<string, unknown>) => void
  getState: () => Record<string, unknown>
}