mustafabayar / immo_trakt

Telegram Bot to find offers on immobilienscout24.de for given criterias.
MIT License
25 stars 7 forks source link

Panic: Unauthorized when Telegram Bot Token is faulty #4

Closed a0n closed 2 years ago

a0n commented 2 years ago
➜  immo_trakt git:(main) ✗ go run main.go
go: downloading gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b
go: downloading github.com/go-telegram-bot-api/telegram-bot-api v4.6.4+incompatible
go: downloading github.com/go-co-op/gocron v1.5.0
go: downloading github.com/kelseyhightower/envconfig v1.4.0
go: downloading golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
go: downloading github.com/robfig/cron/v3 v3.0.1
go: downloading github.com/technoweenie/multipartstreamer v1.0.1
2022/03/24 18:05:14 ImmoTrakt is going to run with following configuration: 
Frequency: 1m
Include Existing Offers: false
Search: https://www.immobilienscout24.de/Suche/de/berlin/berlin/wohnung-mieten?price=-950.0&pricetype=calculatedtotalrent&enteredFrom=result_list
Exclude WBS: false
Exclude Tausch: false
2022/03/24 18:05:14 Unauthorized
panic: Unauthorized

goroutine 1 [running]:
log.Panic({0xc000177f10, 0x2f, 0xc00007d530})
    /usr/lib/go/src/log/log.go:354 +0x65
main.main()
    /home/a0n/immo_trakt/main.go:102 +0x219
exit status 2
a0n commented 2 years ago

The issue seems to be related to the telegram connection

a0n commented 2 years ago

I could resolve the Issue by Putting the Telegram bot token in quotes