
JavaScript
- 1 ответ
- 0 вопросов
0
Вклад в тег
const { MTProto } = require('@mtproto/core');
const api_id = 'YOU_API_ID';
const api_hash = 'YOU_API_HASH';
// 1. Create an instance
const mtproto = new MTProto({
api_id,
api_hash,
// Use test servers
test: true,
});
// 2. Get the user country code
mtproto.call('help.getNearestDc').then(result => {
console.log(`country:`, result.country);
});