Code Monkey home page Code Monkey logo

Comments (13)

vysheng avatar vysheng commented on May 21, 2024

Yep, this is because you try to send message, before contacts were loaded. You have two options: use "msg user# ..." instead (it will work only if you are this user's contact) or you can use binlog ([-B] key).

from tg.

nixjobin avatar nixjobin commented on May 21, 2024

Hi Vysheng,

Thanks for the reply. Yes, the contact is in my contact. So itred the below and its not working

msg 965XXXXXXXX hello | ./telegram
msg +965XXXXXXXX hello | ./telegram
msg 00965XXXXXXXX hello | ./telegram

All of them giving the same error. "Bad user/chat id"

Thanks,

  • Jobin

from tg.

vysheng avatar vysheng commented on May 21, 2024

You can see user_id this way: in tg use command contact_list. There would be lines like this: User #271912: X Y (X_Y 7901...) offline. Was online [2013/11/20 17:26:37]

#271912 in this case is user_id. So you should send msg by command "msg user#271912 text"

from tg.

nixjobin avatar nixjobin commented on May 21, 2024

Hi Vysheng,,

Yep. That did the Job, Thanks for the explanation.

from tg.

vysheng avatar vysheng commented on May 21, 2024

Welcome.

from tg.

cryptid11 avatar cryptid11 commented on May 21, 2024

For this:

msg Telegram_Notifications hello | ./telegram

It gives me: "command not found".

Like if it can't load the contacts in time...any solution?

from tg.

stillru avatar stillru commented on May 21, 2024

msg Telegram_Notifications hello | ./bin/telegram-cli -k server.pub -e

from tg.

stillru avatar stillru commented on May 21, 2024

./bin/telegram-cli -k server.pub -e msg Telegram_Notifications hello
Read about -e key

from tg.

vysheng avatar vysheng commented on May 21, 2024

@cryptid11
Probably you want to use '-W' key or enable binlog
Also it may be useful to use '-R'

from tg.

vysheng avatar vysheng commented on May 21, 2024

Oh, and ./telegram is very old binary. New binary is bin/telegram-cli

from tg.

cryptid11 avatar cryptid11 commented on May 21, 2024

all 2 ways from @stillru doesn't works for me.

here options:
telegram-cli Usage
-u specify username (would not be asked during authorization)
-k specify location of public key (possible multiple entries)
-v increase verbosity (0-ERROR 1-WARNIN 2-NOTICE 3+-DEBUG-levels)
-N message num mode
-c config file name
-p use specified profile
-l log level
-f during authorization fetch all messages since registration
-E disable auto accept of encrypted chats
-s lua script file
-W send dialog_list query and wait for answer before reading input
-C disable color output
-R disable readline
-d daemon mode
-L log file name
-U change uid after start
-G change gid after start
-D disable output
-P port to listen for input commands
-S unix socket to create
-e make commands end exit
-I use user and chat IDs in updates instead of names

seems that the -e option doesn't works...what's wrong @vysheng ?

When I run:

./bin/telegram-cli -k server.pub -e msg Telegram_Notifications hello

It tells me:

I: config dir=[/home/cryptid11/.telegram-cli]
All done. Exit
halt

from tg.

vysheng avatar vysheng commented on May 21, 2024

Try ./bin/telegram-cli -k server.pub -WR -e msg Telegram_Notifications hello

UPD my bad. ./bin/telegram-cli -k server.pub -WR -e "msg Telegram_Notifications hello"

from tg.

cryptid11 avatar cryptid11 commented on May 21, 2024

Still doesn't works but only because @vysheng change the name "Telegram_Notifications" to "Telegram", and then forgot it.

Infact, this command works:

./bin/telegram-cli -k server.pub -WR -e "msg Telegram hello"

Excuse @vysheng I can't resist to kid you a little 👶

Please try your commands before posting! 🌴

from tg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.