channels.editLocation

Edit location of geogroup

Example

const {Api, TelegramClient} = require('telegram');
const {StringSession} = require('telegram/sessions');

const session = new StringSession('');
const client = new TelegramClient(session, apiId, apiHash, {});

(async function run() {
    const result = await client.invoke(new Api.channels.editLocation({
        channel: new Api.InputChannel({...}),
        geoPoint: new Api.InputGeoPoint({...}),
        address: 'random string here',
        }));
    console.log(result); // prints the result
})();

TL schema

boolFalse#bc799737 = Bool;
boolTrue#997275b5 = Bool;
---functions---
channels.editLocation#58e63f6d channel:InputChannel geo_point:InputGeoPoint address:string = Bool;

Parameters

Name

Type

Description

channel

geo_point

New geolocation

address

Address string

Result

Bool

Possible errors

Code

Type

Description

400

MEGAGROUP_REQUIRED

You can only use this method on a supergroup

Can bots use this methd ?

yes

How to handle channels, supergroups, groups, and what's the difference between them.

Last updated