Poll Telegram API until response

I believe you should be returning a tuple from handle_info/2:

  def handle_info(:poll, state) do
    case get_updates(last_update_id) do
      [] ->
        Process.send_after(self(), :poll, 5000)
        {:noreply, state}
      new_messages ->
        state = handle_new_messages(state, new_messages)
        {:noreply, state}
    end
  end