Browse Source

Fix nil pointer

master
parent
commit
c340679b4d
  1. 2
      inlinebotenru.go

2
inlinebotenru.go

@ -42,7 +42,7 @@ func main() {
for update := range updates { for update := range updates {
if update.InlineQuery == nil { // if no inline query, send static help and ignore it if update.InlineQuery == nil { // if no inline query, send static help and ignore it
user := "Unknown" user := "Unknown"
if update.Message.From != nil { if update.Message != nil {
user = update.Message.From.String() user = update.Message.From.String()
} }
if update.Message.Photo != nil { if update.Message.Photo != nil {

Loading…
Cancel
Save