Skip to content

igolaizola/tgio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tgio

Forward input to a telegram chat

Install

go get github.com/igolaizola/tgio/cmd/tgio

Example

echo hello | tgio --token <my-bot-token> -chat <my-chat-id>

Or using a config file

echo hello | tgio --config tgio.conf

where tgio.conf content is:

token <my-bot-token>
chat <my-chat-id>

How to get token and chat parameters

  • Talk to @BotFather to create a new bot with its token
  • Talk to @username_to_id_bot to obtain your chat ID or any other chat ID

Use it in your code

import "github.com/igolaizola/tgio"

...

err := tgio.Forward(ctx, reader, token, chat)

About

Forward input to a telegram chat

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages