enricostara / termgram Goto Github PK
View Code? Open in Web Editor NEWA terminal client to connect with Telegram
Home Page: www.termgram.me
License: MIT License
A terminal client to connect with Telegram
Home Page: www.termgram.me
License: MIT License
I got this error when i enter my telephone number:
/usr/local/lib/node_modules/termgram/lib/client-proxy.js:73
client.sendCodeToPhone(phoneNumber, fulfill);
^
TypeError: undefined is not a function
at /usr/local/lib/node_modules/termgram/lib/client-proxy.js:73:36
at Client. (/usr/local/lib/node_modules/termgram/lib/client-proxy.js:132:13)
at Client.g (events.js:199:16)
at Client.emit (events.js:104:17)
at null._onTimeout (/usr/local/lib/node_modules/termgram/node_modules/telegram.link/lib/utility.js:44:26)
at Timer.listOnTimeout (timers.js:110:15)
When I put app.connectionType to 'TCP' (commented by default), I can't go further than entering my password.
Right after the input, after having entered the pw, I get the loop: 'Authorization on going, wait few seconds.. \�|�/�-�\�|�/�-�\�|�/�' etc.
How to use it with TCP then ?
I need to receive a msg absolutely instantly via the TCP tunnel.
After typing my phone number the program crashes
Phone number, must have the international code: +4
undefined '+4'
(node:35353) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: PHONE_PASSWORD_PROTECTED
(node:35353) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Hi
how can i get the channel messages by this library?
This looks like the same issue as #8, but I am using NodeJS version 0.12.7, which should be supported (?)
Provide your phone number in order to receive the verification code from Telegram
Phone number, must have the international code: +xxxxxxxxxxx
/usr/local/lib/node_modules/termgram/lib/client-proxy.js:73
client.sendCodeToPhone(phoneNumber, fulfill);
^
TypeError: undefined is not a function
at /usr/local/lib/node_modules/termgram/lib/client-proxy.js:73:36
at Client.<anonymous> (/usr/local/lib/node_modules/termgram/lib/client-proxy.js:124:13)
at Client.g (events.js:199:16)
at Client.emit (events.js:104:17)
at null._onTimeout (/usr/local/lib/node_modules/termgram/node_modules/telegram.link/lib/utility.js:58:26)
at Timer.listOnTimeout (timers.js:119:15)
When I try to start termgram I'm getting these error
/usr/local/lib/node_modules/termgram/lib/user-interface.js:17
return new Promise(function (fulfill) {
^
ReferenceError: Promise is not defined
at Object.askWordInput (/usr/local/lib/node_modules/termgram/lib/user-interface.js:17:16)
at askUsername (/usr/local/lib/node_modules/termgram/lib/use-case/sign-up.js:51:8)
at signUp (/usr/local/lib/node_modules/termgram/lib/use-case/sign-up.js:25:5)
at main (/usr/local/lib/node_modules/termgram/termgram.js:32:9)
at Object.<anonymous> (/usr/local/lib/node_modules/termgram/termgram.js:60:1)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
Phone number, must have the international code: +34622****
password: 1234
phoneNumber: +34622890544
sendCode result: { id: "cfed2***", typeName: "api.type.auth.SentAppCode", phone_registered: { id: "b575****", typeName: "api.type.BoolTrue" }, phone_code_hash: "0b3f7da08*****", send_call_timeout: 120, is_password: { id: "379****", typeName: "api.type.BoolFalse" } }
nothing to do, now...
selectChat error: TypeError: Cannot read property 'instanceOf' of undefined
at renderChat (/usr/lib/node_modules/termgram/lib/use-case/select-chat.js:57:32)
at /usr/lib/node_modules/termgram/lib/use-case/select-chat.js:32:44
at lib$es6$promise$$internal$$tryCatch (/usr/lib/node_modules/termgram/node_modules/telegram.link/node_modules/es6-promise/dist/es6-promise.js:326:16)
at lib$es6$promise$$internal$$invokeCallback (/usr/lib/node_modules/termgram/node_modules/telegram.link/node_modules/es6-promise/dist/es6-promise.js:338:17)
at lib$es6$promise$$internal$$publish (/usr/lib/node_modules/termgram/node_modules/telegram.link/node_modules/es6-promise/dist/es6-promise.js:309:11)
at lib$es6$promise$asap$$flush (/usr/lib/node_modules/termgram/node_modules/telegram.link/node_modules/es6-promise/dist/es6-promise.js:120:9)
at process._tickCallback (node.js:355:11)
on object with type api.type.MessageActionChatDeleteUser
(it doesn't have media
property)
Could you show how to use the auth.logout if at all it is part of telegram link?
Hi,
first thank for your work, can't wait being able to send/retrieve messages !
I'm trying to get telegram.link to work, but I can't manage to send a verification code to login, here's my code :
(Wasn't sure whether to post here or in telegram.link, since I'm basing my work on this project).
var os = require('os');
var telegramLink = require('telegram.link')();
// set the environment
var app = {
id: -----,
hash: '----------------------------',
version: '1.0.0',
lang: 'fr',
deviceModel: os.type().replace('Darwin', 'OS_X'),
systemVersion: os.platform() + '/' + os.release()
};
var client = telegramLink.createClient(
app,
telegramLink.TEST_PRIMARY_DC,
function () {
console.log('Connected to Telegram !');
client.createAuthKey(function (auth) {
console.log('Auth key OK: %s', auth.key.toString());
client.auth.sendCode("+336--------);
});
}
);
Any idea? May be I am missing a step ?
After installing npm install -g termgram
and signed in to my telegram account, I tried uninstalling npm uninstall -g termgram
.
After I installed Termgram agian, it had the previous data and asked for username/password instead of prompting for phone number and verification code (as it does the first time I installed it).
Thanks
Hi Enrico.
Termgram doesn't recognize mi USA phone number. It says:
"Hey, this is not an international phone number!"
If I put a '+' char before number, it says:
phoneNumber: +1XXXXXXXXX
sendCode result: { id: "d951edef", typeName: "api.type.auth.SentCode", phone_registered: { id: "b5757299", typeName: "api.type.BoolTrue" }, phone_code_hash: "b489376c298d1e463f", send_call_timeout: 120, is_password: { id: "379779bc", typeName: "api.type.BoolFalse" } }
nothing to do, now...
Which format must have an international phone number?
The log is follows:
T E R M G R A M 0.2.1
powered by telegram.link
Welcome to TERMGRAM, a terminal client to connect with Telegram.
Termgram Login
Username (<cut>):
Password: ****
Welcome back <cut>!
start updates
set state { T:api.type.updates.State, pts: 671, qts: 0, date: 1453223759, seq: 2, unread_count: 0 }
________________________________________
Chats:
[ 8 ] <cut>
<cut>
[ 7 ] <cut>
<cut>
[ 6 ] <cut>
<cut>
selectChat error: Error: Unknown user type api.type.UserSelf
at retrieveInputPeer (/home/username/.npm-packages/lib/node_modules/termgram/lib/use-case/select-chat.js:98:15)
at renderChat (/home/username/.npm-packages/lib/node_modules/termgram/lib/use-case/select-chat.js:73:21)
at /home/username/.npm-packages/lib/node_modules/termgram/lib/use-case/select-chat.js:32:44
at lib$es6$promise$$internal$$tryCatch (/home/username/.npm-packages/lib/node_modules/termgram/node_modules/es6-promise/dist/es6-promise.js:331:16)
at lib$es6$promise$$internal$$invokeCallback (/home/username/.npm-packages/lib/node_modules/termgram/node_modules/es6-promise/dist/es6-promise.js:343:17)
at lib$es6$promise$$internal$$publish (/home/username/.npm-packages/lib/node_modules/termgram/node_modules/es6-promise/dist/es6-promise.js:314:11)
at lib$es6$promise$asap$$flush (/home/username/.npm-packages/lib/node_modules/termgram/node_modules/es6-promise/dist/es6-promise.js:125:9)
at nextTickCallbackWith0Args (node.js:452:9)
at process._tickCallback (node.js:381:13)
stop updates
I notice "api.type.UserSelf", maybe application crashes because i have added myself to telegram user lst? Don't really know, just guessing.
Cheers
P.S. theese numbers can be helpful also
node -v
v5.4.1
npm -v
3.5.3
Hi!
Just wanted to raise this issue for the following error:
TELEGRAM.LINK
v.0.3.0
Welcome to TERMGRAM, a terminal client to connect with Telegram.
To protect your Telegram identity you must create a local user/password,
Termgram will use your password to encrypt your authorization data saved locally.
Choose your username, it will be local and it will not be used by Telegram!
/usr/local/lib/node_modules/termgram/lib/user-interface.js:17
return new Promise(function (fulfill) {
^
ReferenceError: Promise is not defined
at Object.askWordInput (/usr/local/lib/node_modules/termgram/lib/user-interface.js:17:16)
at askUsername (/usr/local/lib/node_modules/termgram/lib/use-case/sign-up.js:51:8)
at signUp (/usr/local/lib/node_modules/termgram/lib/use-case/sign-up.js:25:5)
at main (/usr/local/lib/node_modules/termgram/termgram.js:31:9)
at Object.<anonymous> (/usr/local/lib/node_modules/termgram/termgram.js:62:1)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
I appreciate that this is probably still alpha but wanted to ensure you knew there was an issue on ubuntu
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.