Open whimax opened 1 year ago
Hi! I've test this code:
updates := bot.GetUpdatesChan(u) for update := range updates { if update.Message.Poll != nil { fmt.Printf("poll\n") } if update.Message != nil { fmt.Printf("msg %v\n", update.Message) poll := tgbotapi.NewPoll(update.Message.Chat.ID, "test poll", "1", "2", "3") bot.Send(poll) } }
when bot send poll update.Message.Poll not nil and contain poll params, but check "update.Message.Poll != nil" result error: panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x63b863]
Hi! I've test this code:
when bot send poll update.Message.Poll not nil and contain poll params, but check "update.Message.Poll != nil" result error: panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x63b863]