From 9804f85677e66bada1a1b25805982af03318e6e9 Mon Sep 17 00:00:00 2001 From: Hamcha Date: Tue, 3 Apr 2018 11:54:00 +0200 Subject: [PATCH] Add readme and fix imports --- README.md | 4 +++- broker-data/config.json.sample | 7 +++++++ cmd/tg-broker/action.go | 2 +- cmd/tg-broker/clients.go | 2 +- cmd/tg-broker/telegram.go | 2 +- cmd/tg-broker/webhook.go | 2 +- 6 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 broker-data/config.json.sample diff --git a/README.md b/README.md index 1850c28..cd82dd0 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ # Bot API for Telegram bots -Should work if you can put the time to figure out how it works (check client_test.go or better yet, [clessy](https://github.com/hamcha/clessy)) \ No newline at end of file +Should work if you can put the time to figure out how it works (check client_test.go or better yet, [clessy](https://github.com/hamcha/clessy)) + +(Yes this needs proper docs and everything but I'm kinda busy doing other stuff) \ No newline at end of file diff --git a/broker-data/config.json.sample b/broker-data/config.json.sample new file mode 100644 index 0000000..da4887c --- /dev/null +++ b/broker-data/config.json.sample @@ -0,0 +1,7 @@ +{ + "BindServer" : ":7313", + "BindClients": "127.0.0.1:7314", + "Token" : "Bot token here", + "BaseURL" : "https://my.bot.host", + "WebhookURL" : "/secret_url_here" +} \ No newline at end of file diff --git a/cmd/tg-broker/action.go b/cmd/tg-broker/action.go index 826b6a6..1c45e33 100644 --- a/cmd/tg-broker/action.go +++ b/cmd/tg-broker/action.go @@ -3,7 +3,7 @@ package main import ( "net" - "github.com/hamcha/clessy/tg" + "github.com/hamcha/tg" ) func executeClientCommand(action tg.ClientCommand, client net.Conn) { diff --git a/cmd/tg-broker/clients.go b/cmd/tg-broker/clients.go index d93687f..630cdd9 100644 --- a/cmd/tg-broker/clients.go +++ b/cmd/tg-broker/clients.go @@ -7,7 +7,7 @@ import ( "log" "net" - "github.com/hamcha/clessy/tg" + "github.com/hamcha/tg" ) var clients []net.Conn diff --git a/cmd/tg-broker/telegram.go b/cmd/tg-broker/telegram.go index cafcc03..f6b3d98 100644 --- a/cmd/tg-broker/telegram.go +++ b/cmd/tg-broker/telegram.go @@ -14,7 +14,7 @@ import ( "net/url" "strconv" - "github.com/hamcha/clessy/tg" + "github.com/hamcha/tg" ) // APIEndpoint is Telegram's current Bot API base url endpoint diff --git a/cmd/tg-broker/webhook.go b/cmd/tg-broker/webhook.go index 8e999d1..5423d65 100644 --- a/cmd/tg-broker/webhook.go +++ b/cmd/tg-broker/webhook.go @@ -5,7 +5,7 @@ import ( "log" "net/http" - "github.com/hamcha/clessy/tg" + "github.com/hamcha/tg" ) func webhook(rw http.ResponseWriter, req *http.Request) {