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

[Q] How to send one message from cli ? #518

Open
flyingrub opened this issue May 12, 2015 · 7 comments
Open

[Q] How to send one message from cli ? #518

flyingrub opened this issue May 12, 2015 · 7 comments

Comments

@flyingrub
Copy link

hi, in my case i only need to send one msg sometimes (to notify me of somethings). I would like to launch it from a python / bash / ruby script. What is the simplest way to send only one message, without creating daemon, lua script ect ?
I've seen a lot of thing in bash bur none worked :/
it would be great if we could launch only one command without opening the pseudo shell.

@luckydonald
Copy link

have a look at the -e parameter.

@flyingrub
Copy link
Author

Thanks, i will try it :)

Also why is there no docs for the differents options of the telegram-cli ?

@flyingrub
Copy link
Author

there is an issue, the -W option is executed after the -e one, so i can't send message to any groupchat with this options.

@LukeLR
Copy link

LukeLR commented May 12, 2015

There is a documentation, try telegram-cli -h, it will print all it's arguments ;) I am not Shure, but the issue that telegram is unable to send messages to users it hasn't messaged before is maybe fixed in the test branch. You should probably download that one and give it a try ;)

On 12 May 2015, at 6:03 pm, Ronan Nello [email protected] wrote:

there is an issue, the -W option is executed after the -e one, so i can't send message to any groupchat with this options.


Reply to this email directly or view it on GitHub.

@jonnywilliamson
Copy link
Contributor

Are you using the TEST branch?

I think the requirement for -W on the command line before it will send a message with -e is not required anymore.

@flyingrub
Copy link
Author

i've found this workaround, (sleep 5; echo "msg user msg") | telegram-cli -W, i use the master one.

@gnumoksha
Copy link

@flyingrub I have better experience using this:

./telegram-cli -k tg-server.pub -WR -e "msg $USER $TEXT"

eg.:

./telegram-cli -k tg-server.pub -WR -e "msg user#1234567 hi"

See

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

5 participants