Add readme and fix imports

This commit is contained in:
Hamcha 2018-04-03 11:54:00 +02:00
parent cc45fb5209
commit 9804f85677
Signed by: hamcha
GPG key ID: A40413D21021EAEE
6 changed files with 14 additions and 5 deletions

View file

@ -1,3 +1,5 @@
# Bot API for Telegram bots # 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)) 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)

View file

@ -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"
}

View file

@ -3,7 +3,7 @@ package main
import ( import (
"net" "net"
"github.com/hamcha/clessy/tg" "github.com/hamcha/tg"
) )
func executeClientCommand(action tg.ClientCommand, client net.Conn) { func executeClientCommand(action tg.ClientCommand, client net.Conn) {

View file

@ -7,7 +7,7 @@ import (
"log" "log"
"net" "net"
"github.com/hamcha/clessy/tg" "github.com/hamcha/tg"
) )
var clients []net.Conn var clients []net.Conn

View file

@ -14,7 +14,7 @@ import (
"net/url" "net/url"
"strconv" "strconv"
"github.com/hamcha/clessy/tg" "github.com/hamcha/tg"
) )
// APIEndpoint is Telegram's current Bot API base url endpoint // APIEndpoint is Telegram's current Bot API base url endpoint

View file

@ -5,7 +5,7 @@ import (
"log" "log"
"net/http" "net/http"
"github.com/hamcha/clessy/tg" "github.com/hamcha/tg"
) )
func webhook(rw http.ResponseWriter, req *http.Request) { func webhook(rw http.ResponseWriter, req *http.Request) {