From 90c48448d2f023b3c7d5d14379ad8e4deae07ebb Mon Sep 17 00:00:00 2001 From: Syfaro Date: Fri, 26 Jun 2015 01:19:29 -0500 Subject: [PATCH] more comments on things --- bot.go | 3 +++ updates.go | 1 + 2 files changed, 4 insertions(+) diff --git a/bot.go b/bot.go index bf71a06..2213179 100644 --- a/bot.go +++ b/bot.go @@ -1,3 +1,4 @@ +// Methods for interacting with the Telegram Bot API. package tgbotapi type BotApi struct { @@ -7,6 +8,8 @@ type BotApi struct { Updates chan Update `json:"-"` } +// Creates a new BotApi instance. +// Requires a token, provided by @BotFather on Telegram func NewBotApi(token string) (*BotApi, error) { bot := &BotApi{ Token: token, diff --git a/updates.go b/updates.go index 0d0847a..6372409 100644 --- a/updates.go +++ b/updates.go @@ -1,5 +1,6 @@ package tgbotapi +// Returns a chan that is called whenever a new message is gotten. func (bot *BotApi) UpdatesChan(config UpdateConfig) (chan Update, error) { bot.Updates = make(chan Update, 100)