Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First example doesnt work #276

Open
horr0rjkeezor opened this issue Feb 10, 2023 · 0 comments
Open

First example doesnt work #276

horr0rjkeezor opened this issue Feb 10, 2023 · 0 comments

Comments

@horr0rjkeezor
Copy link

horr0rjkeezor commented Feb 10, 2023

Code:
`const path = require('path');
const MTProto = require('@mtproto/core');

const api_id = "1663794";
const api_hash = "d011ea569072f733217411d392cce73";

// 1. Create instance
const mtproto = new MTProto({
api_id,
api_hash,

storageOptions: {
    path: path.resolve(__dirname, './data/1.json'),
},

});
console.log("test before");
// 2. Print the user country code
mtproto.call('help.getNearestDc').then(result => {
console.log('country:', result.country);
});
console.log("test after");`

When i run, i get this messages in console:

D:\xampp\htdocs\telegrr>node index.js
test before
test after

And what i can do with this? Method "help.getNearestDc", does not respond. I wait five minutes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant