diff --git a/bot.go b/bot.go index 691915d..85b681a 100644 --- a/bot.go +++ b/bot.go @@ -8,12 +8,15 @@ import ( swissknife "github.com/Sagleft/swiss-knife" "github.com/Sagleft/uchatbot-engine" "github.com/Sagleft/utopialib-go/v2/pkg/structs" + "github.com/common-nighthawk/go-figure" "github.com/fatih/color" tb "gopkg.in/telebot.v3" ) const ( + previewTitle = "bridge" configFilePath = "config.json" + previewColor = "green" longPollerInterval = 15 * time.Second ) @@ -43,6 +46,9 @@ func (b *bot) setTelegramBot(tgBot *tb.Bot) { } func main() { + figure.NewColorFigure(previewTitle, "", previewColor, true).Print() + fmt.Println() + cfg := config{} if err := swissknife.ParseStructFromJSONFile(configFilePath, &cfg); err != nil { color.Red("read config: %s", err.Error()) diff --git a/go.mod b/go.mod index cc5758d..947edf6 100644 --- a/go.mod +++ b/go.mod @@ -6,18 +6,17 @@ require ( github.com/Sagleft/swiss-knife v1.2.1 github.com/Sagleft/uchatbot-engine v1.5.2 github.com/Sagleft/utopialib-go/v2 v2.3.0 + github.com/common-nighthawk/go-figure v0.0.0-20210622060536-734e95fb86be github.com/fatih/color v1.14.1 gopkg.in/telebot.v3 v3.1.2 ) require ( - github.com/Syfaro/telegram-bot-api v4.6.4+incompatible // indirect github.com/beefsack/go-rate v0.0.0-20220214233405-116f4ca011a0 // indirect github.com/ctengiz/evtwebsocket v0.0.0-20180717104640-fc3583982591 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.17 // indirect github.com/sagleft/simple-cron v1.5.0 // indirect - github.com/technoweenie/multipartstreamer v1.0.1 // indirect golang.org/x/net v0.0.0-20220526153639-5463443f8c37 // indirect golang.org/x/sys v0.3.0 // indirect gopkg.in/grignaak/tribool.v1 v1.0.0-20150312065122-d6bb19d816df // indirect diff --git a/go.sum b/go.sum index 33d6d02..a44d3d2 100644 --- a/go.sum +++ b/go.sum @@ -64,8 +64,6 @@ github.com/Sagleft/uchatbot-engine v1.5.2 h1:/Bq7+TU2OzJZtcrnonkAgiNsHTome6UprbV github.com/Sagleft/uchatbot-engine v1.5.2/go.mod h1:QrSY84Q8qmCaJdw7gt+UP12RWdFfVBO3JcI5tVTEZIU= github.com/Sagleft/utopialib-go/v2 v2.3.0 h1:bVgspeCLYI/7PIqnTJknXW8bYF4IXLLCzVk2QkTrocA= github.com/Sagleft/utopialib-go/v2 v2.3.0/go.mod h1:9HuTLrcyVlaNIW3Vw4FCMrlOFt2fJ0ZI8WBOk5+2e6M= -github.com/Syfaro/telegram-bot-api v4.6.4+incompatible h1:O30CgxZ/BuHpWfONoGirTIU7XUWhz6NPelk80FxipDI= -github.com/Syfaro/telegram-bot-api v4.6.4+incompatible/go.mod h1:eC/lEGT3gOB9RowMYsLx0YH1U8a/dEjceHY3M//ej88= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -101,6 +99,8 @@ github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/common-nighthawk/go-figure v0.0.0-20210622060536-734e95fb86be h1:J5BL2kskAlV9ckgEsNQXscjIaLiOYiZ75d4e94E6dcQ= +github.com/common-nighthawk/go-figure v0.0.0-20210622060536-734e95fb86be/go.mod h1:mk5IQ+Y0ZeO87b858TlA645sVcEcbiX6YqP98kt+7+w= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= @@ -377,8 +377,6 @@ github.com/stretchr/testify v1.7.5/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= -github.com/technoweenie/multipartstreamer v1.0.1 h1:XRztA5MXiR1TIRHxH2uNxXxaIkKQDeX7m2XsSOlQEnM= -github.com/technoweenie/multipartstreamer v1.0.1/go.mod h1:jNVxdtShOxzAsukZwTSw6MDx5eUJoiEBsSvzDU9uzog= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=