func (bot *BotAPI) IsMessageToMe(message Message) bool {
	return strings.Contains(message.Text, "@"+bot.Self.UserName)
}
IsMessageToMe returns true if message directed to this bot.

It requires the Message.
package tgbotapi
import (
	"bytes"
	"encoding/json"
	"errors"
	"fmt"
	"io"
	"io/ioutil"
	"log"
	"net/http"
	"net/url"
	"os"
	"strconv"
	"strings"
	"time"
	"github.com/technoweenie/multipartstreamer"
)
type BotAPI struct {
	Token  string `json:"token"`
	Debug  bool   `json:"debug"`
	Buffer int    `json:"buffer"`
	Self   User         `json:"-"`
	Client *http.Client `json:"-"`
}
func NewBotAPI(token string) (*BotAPI, error) {
	return NewBotAPIWithClient(token, &http.Client{})
}
func NewBotAPIWithClient(token string, client *http.Client) (*BotAPI, error) {
	bot := &BotAPI{
		Token:  token,
		Client: client,
		Buffer: 100,
	}
	self, err := bot.GetMe()
	if err != nil {
		return nil, err
	}
	bot.Self = self
	return bot, nil
}
func (bot *BotAPI) MakeRequest(endpoint string, params url.Values) (APIResponse, error) {
	method := fmt.Sprintf(APIEndpoint, bot.Token, endpoint)
	resp, err := bot.Client.PostForm(method, params)
	if err != nil {
		return APIResponse{}, err
	}
	defer resp.Body.Close()
	var apiResp APIResponse
	bytes, err := bot.decodeAPIResponse(resp.Body, &apiResp)
	if err != nil {
		return apiResp, err
	}
	if bot.Debug {
		log.Printf("%s resp: %s", endpoint, bytes)
	}
	if !apiResp.Ok {
		return apiResp, errors.New(apiResp.Description)
	}
	return apiResp, nil
}
func (bot *BotAPI) decodeAPIResponse(responseBody io.Reader, resp *APIResponse) (_ []byte, err error) {
	if !bot.Debug {
		dec := json.NewDecoder(responseBody)
		err = dec.Decode(resp)
		return
	}
	data, err := ioutil.ReadAll(responseBody)
	if err != nil {
		return
	}
	err = json.Unmarshal(data, resp)
	if err != nil {
		return
	}
	return data, nil
}
func (bot *BotAPI) makeMessageRequest(endpoint string, params url.Values) (Message, error) {
	resp, err := bot.MakeRequest(endpoint, params)
	if err != nil {
		return Message{}, err
	}
	var message Message
	json.Unmarshal(resp.Result, &message)
	bot.debugLog(endpoint, params, message)
	return message, nil
}
func (bot *BotAPI) UploadFile(endpoint string, params map[string]string, fieldname string, file interface{}) (APIResponse, error) {
	ms := multipartstreamer.New()
	switch f := file.(type) {
	case string:
		ms.WriteFields(params)
		fileHandle, err := os.Open(f)
		if err != nil {
			return APIResponse{}, err
		}
		defer fileHandle.Close()
		fi, err := os.Stat(f)
		if err != nil {
			return APIResponse{}, err
		}
		ms.WriteReader(fieldname, fileHandle.Name(), fi.Size(), fileHandle)
	case FileBytes:
		ms.WriteFields(params)
		buf := bytes.NewBuffer(f.Bytes)
		ms.WriteReader(fieldname, f.Name, int64(len(f.Bytes)), buf)
	case FileReader:
		ms.WriteFields(params)
		if f.Size != -1 {
			ms.WriteReader(fieldname, f.Name, f.Size, f.Reader)
			break
		}
		data, err := ioutil.ReadAll(f.Reader)
		if err != nil {
			return APIResponse{}, err
		}
		buf := bytes.NewBuffer(data)
		ms.WriteReader(fieldname, f.Name, int64(len(data)), buf)
	case url.URL:
		params[fieldname] = f.String()
		ms.WriteFields(params)
	default:
		return APIResponse{}, errors.New(ErrBadFileType)
	}
	method := fmt.Sprintf(APIEndpoint, bot.Token, endpoint)
	req, err := http.NewRequest("POST", method, nil)
	if err != nil {
		return APIResponse{}, err
	}
	ms.SetupRequest(req)
	res, err := bot.Client.Do(req)
	if err != nil {
		return APIResponse{}, err
	}
	defer res.Body.Close()
	bytes, err := ioutil.ReadAll(res.Body)
	if err != nil {
		return APIResponse{}, err
	}
	if bot.Debug {
		log.Println(string(bytes))
	}
	var apiResp APIResponse
	err = json.Unmarshal(bytes, &apiResp)
	if err != nil {
		return APIResponse{}, err
	}
	if !apiResp.Ok {
		return APIResponse{}, errors.New(apiResp.Description)
	}
	return apiResp, nil
}
func (bot *BotAPI) GetFileDirectURL(fileID string) (string, error) {
	file, err := bot.GetFile(FileConfig{fileID})
	if err != nil {
		return "", err
	}
	return file.Link(bot.Token), nil
}
func (bot *BotAPI) GetMe() (User, error) {
	resp, err := bot.MakeRequest("getMe", nil)
	if err != nil {
		return User{}, err
	}
	var user User
	json.Unmarshal(resp.Result, &user)
	bot.debugLog("getMe", nil, user)
	return user, nil
}