Fix bug regarding trailing whitespace in token

This commit is contained in:
Kenneth Bruen 2023-09-27 07:08:20 +02:00
parent b44f1c92d2
commit faa17a12d6
Signed by: kbruen
GPG key ID: C1980A470C3EE5B1

View file

@ -54,6 +54,7 @@ func main() {
log.SetOutput(os.Stderr)
botToken := os.Getenv("CFR_BOT.TOKEN")
botToken = strings.TrimSpace(botToken)
if len(botToken) == 0 {
log.Fatal("ERROR: No bot token supplied; supply with CFR_BOT.TOKEN")
}