ztg.go 429 Bytes
Newer Older
Vladimir Barsukov's avatar
rename  
Vladimir Barsukov committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package ztg

import (
	"net/http"
	"time"
)

type ZTg struct {
	client       *http.Client
	botKey       string
	defaultProps map[string]any
	mode         int
	batch        bool
	apiUrl       string
}

func Default(botKey string) *ZTg {
	return &ZTg{
		client: &http.Client{Timeout: time.Second * 5},
		botKey: botKey,
		defaultProps: map[string]any{
			"parse_mode": "HTML",
		},
		mode:   0,
		batch:  false,
		apiUrl: "",
	}
}