Skip to content

Commit

Permalink
small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
thedmdim committed May 16, 2024
1 parent 86f61bf commit 4747f7d
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions cmd/tele/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,23 @@ func main() {
log.Fatal("no dsn provided")
}

db, err := sqlitex.NewPool(dsn, sqlitex.PoolOptions{PoolSize: 100})
db, err := sqlitex.NewPool(dsn, sqlitex.PoolOptions{PoolSize: 50})
if err != nil {
log.Fatal("cannot open db", err)
}

api := echotron.NewAPI(token)
res, err := api.GetMe()
if err != nil {
log.Fatal("cannot get my username", err)
}
me := res.Result.Username

for u := range echotron.PollingUpdates(token) {

visitor := strconv.FormatInt(u.ChatID(), 10)


if u.Message != nil && u.Message.Text == "/start" {
if u.Message != nil && (u.Message.Text == "/start" || u.Message.Text == "/start@"+me ) {

sc := &handlers.SearchCriteria{
YearsFrom: strconv.Itoa(DefaultYear),
Expand Down

0 comments on commit 4747f7d

Please sign in to comment.