func NewClient(token string) *Bot {
	return &Bot{
		token:       token,
		tokenHashed: fmt.Sprintf("%x", md5.Sum([]byte(token))),

		httpClient: &http.Client{
			Transport: &http.Transport{
				DialContext: (&net.Dialer{
					Timeout:   10 * time.Second,
					KeepAlive: 300 * time.Second,
				}).DialContext,
				IdleConnTimeout:       90 * time.Second,
				TLSHandshakeTimeout:   10 * time.Second,
				ResponseHeaderTimeout: 10 * time.Second,
				ExpectContinueTimeout: 1 * time.Second,
			},
		},

		quitLoop: make(chan struct{}, 1),
	}
}
// NewClient gets a new bot API client with given token string.
NewClient gets a new bot API client with given token string.
// NewClient gets a new bot API client with given token string .
func NewClient(token string) *Bot {
	return &Bot{
		token:       token,
		tokenHashed: fmt.Sprintf("%x", md5.Sum([]byte(token))),
		httpClient: &http.Client{
			Transport: &http.Transport{
				DialContext: (&net.Dialer{
					Timeout:   10 * time.Second,
					KeepAlive: 300 * time.Second,
				}).DialContext,
				IdleConnTimeout:       90 * time.Second,
				TLSHandshakeTimeout:   10 * time.Second,
				ResponseHeaderTimeout: 10 * time.Second,
				ExpectContinueTimeout: 1 * time.Second,
			},
		},
		quitLoop: make(chan struct{}, 1),
	}
}
func NewClient ( token string ) * Bot { return & Bot { token : token , tokenHashed : fmt . Sprintf ( " " , md5 . Sum ( [ ] byte ( token ) ) ) , httpClient : & http . Client { Transport : & http . Transport { DialContext : ( & net . Dialer { Timeout : 10 * time . Second , KeepAlive : 300 * time . Second , } ) . DialContext , IdleConnTimeout : 90 * time . Second , TLSHandshakeTimeout : 10 * time . Second , ResponseHeaderTimeout : 10 * time . Second , ExpectContinueTimeout : 1 * time . Second , } , } , quitLoop : make ( chan struct { } , 1 ) , } }
NewClient gets a new bot API client with given token string.
NewClient gets a new bot API client with given token string .