1234567891011121314151617181920212223 |
- const { TelegramClient } = require('telegram/dist')
- const { StringSession } = require('telegram/dist/sessions');
- (async () => {
- console.log('Loading interactive example...')
- const apiId = -1
- const apiHash = ''
- const client = new TelegramClient(new StringSession(''), apiId, apiHash, {
- connectionRetries: 3,
- })
- await client.start({
- botAuthToken: 'YOUR BOT TOKEN',
- })
- console.log('You should now be connected.')
- console.log(await client.getMe())
-
- console.log(await client.session.save())
- })()
|