Bot for storing message in Telegram discussion.
Can receive 4 commands:
/get
: Get channel description/set
: Set channel description/add
: Add line to channel description/remove
: Remove line from channel description
All data is stored in kvstore.io.
For example:
yarn global add now
now secrets add keeper-kvstore-token "XXXXX"
now secrets add keeper-bot-id "123:ABC"
now
You can first change the alias in now.json.
{
"alias": "custom-alias",
}
Then, once the deployment is done:
now alias
curl -i -X GET https://api.telegram.org/bot<apikey>/getMe
curl -i -X GET https://api.telegram.org/bot<apikey>/getWebhookInfo
DOMAIN=<domain>
APIKEY=<apikey>
curl -F "url=https://$DOMAIN/$APIKEY/send" https://api.telegram.org/bot$APIKEY/setWebhook
- https://golang.org
- Download: https://golang.org/dl
- Documentation: https://golang.org/doc
- https://golang.org/doc/effective_go.html
- https://golang.org/ref/spec
- https://github.com/a8m/go-lang-cheat-sheet
- https://github.com/golang/go/wiki/IDEsAndTextEditorPlugins
- Autocomplete dans les IDE : Gocode
- http://decouvrir-golang.net/
- http://golang-examples.tumblr.com
- http://www.golangpatterns.info/object-oriented/operators
- http://devs.cloudimmunity.com/gotchas-and-common-mistakes-in-go-golang/
- Un bon article sur la gestion des erreurs en Go. Utile lorsqu'on ne connaît que les exceptions ! : https://justinas.org/best-practices-for-errors-in-go/
- http://miek.nl/go/learninggo.html#beyond-the-basics
- http://etienner.fr/golang/creer-une-api-restfull-sur-go
- https://gobyexample.com/
- https://github.com/golang/example
- https://github.com/golang-samples
- https://github.com/gobridge
Les méthodes de test doivent commencer par Test
.
import "testing"
func TestName(t *testing.T) {
[...]
if actual != expected {
t.Errorf("Must be %s but was %s", expected, actual)
}
}